Skip to content

Commit

Permalink
Let total_steps be modifiable (#303)
Browse files Browse the repository at this point in the history
* Let total_steps be modifiable

* Fix numpy version (#304)

* Fix pytorch version?
  • Loading branch information
belerico authored Jul 1, 2024
1 parent c8e6522 commit 8e16b87
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sheeprl/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,9 @@ def resume_from_checkpoint(cfg: DictConfig) -> DictConfig:
# Remove keys from the `old_cfg` that must not be overridden
old_cfg.pop("root_dir", None)
old_cfg.pop("run_name", None)
old_cfg.checkpoint.pop("resume_from", None)
old_cfg.algo.pop("total_steps", None)
old_cfg.algo.pop("learning_starts", None)
old_cfg.checkpoint.pop("resume_from", None)
# Substitute the config with the old one (except for the parameters removed before)
# because the experiment must continue with the same parameters
with open_dict(cfg):
Expand Down

0 comments on commit 8e16b87

Please sign in to comment.