Skip to content

Commit

Permalink
/fix setting incorrect device in env_cfg
Browse files Browse the repository at this point in the history
  • Loading branch information
amrmousa144 committed Sep 21, 2024
1 parent e00d625 commit c57d5a1
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,10 @@ Guidelines for modifications:

## Contributors

* Anton Bjørndahl Mortensen
* Alice Zhou
* Amr Mousa
* Andrej Orsula
* Anton Bjørndahl Mortensen
* Antonio Serrano-Muñoz
* Arjun Bhardwaj
* Brayden Zhang
Expand Down
1 change: 1 addition & 0 deletions source/standalone/workflows/rsl_rl/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ def main(env_cfg: ManagerBasedRLEnvCfg | DirectRLEnvCfg | DirectMARLEnvCfg, agen
# set the environment seed
# note: certain randomizations occur in the environment initialization so we set the seed here
env_cfg.seed = agent_cfg.seed
env_cfg.sim.device = args_cli.device

# specify directory for logging experiments
log_root_path = os.path.join("logs", "rsl_rl", agent_cfg.experiment_name)
Expand Down
1 change: 1 addition & 0 deletions source/standalone/workflows/sb3/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ def main(env_cfg: ManagerBasedRLEnvCfg | DirectRLEnvCfg | DirectMARLEnvCfg, agen
# set the environment seed
# note: certain randomizations occur in the environment initialization so we set the seed here
env_cfg.seed = agent_cfg["seed"]
env_cfg.sim.device = args_cli.device

# directory for logging into
log_dir = os.path.join("logs", "sb3", args_cli.task, datetime.now().strftime("%Y-%m-%d_%H-%M-%S"))
Expand Down
3 changes: 2 additions & 1 deletion source/standalone/workflows/skrl/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,8 @@ def main(env_cfg: ManagerBasedRLEnvCfg | DirectRLEnvCfg | DirectMARLEnvCfg, agen
# set the environment seed
# note: certain randomizations occur in the environment initialization so we set the seed here
env_cfg.seed = args_cli.seed if args_cli.seed is not None else agent_cfg["seed"]

env_cfg.sim.device = args_cli.device

# specify directory for logging experiments
log_root_path = os.path.join("logs", "skrl", agent_cfg["agent"]["experiment"]["directory"])
log_root_path = os.path.abspath(log_root_path)
Expand Down

0 comments on commit c57d5a1

Please sign in to comment.