Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Collector does not save results if setting idx in constructor #98

Open
panahiparham opened this issue Dec 23, 2024 · 1 comment · Fixed by panahiparham/PyExpUtils#1 · May be fixed by #99
Open

Collector does not save results if setting idx in constructor #98

panahiparham opened this issue Dec 23, 2024 · 1 comment · Fixed by panahiparham/PyExpUtils#1 · May be fixed by #99

Comments

@panahiparham
Copy link

The collector object requires idx to save experiment results. In rl-control-template this index is set after the collector is constructed as follows:

collector = Collector( config=..., default=...,)
collector.setIdx(idx)

However manually setting the index forces a collector reset which sets the frame to -1. In order to load Collector checkpoints, I need to set the index in the constructor as follows:

collector = Collector( config=..., default=..., idx=idx)

I noticed setting the index in the constructor does not add this index to self._idxs and this causes an issue with saving results because saveCollector loops over self._idxs and will ignore the index set during construction.

@panahiparham
Copy link
Author

I propose a simple fix where at the end construction, if an index is passed to the constructor, we add it to self._idxs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant