Unverified Commit 7b4dde86 authored by Kaixi Bao's avatar Kaixi Bao Committed by GitHub

Fixes setting the seed from CLI for RSL-RL (#1084)

# Description

This pull request fixes a bug that prevented setting the seed from CLI
arguments. The issue was caused by an extra pair of quotation marks in
the `hasattr` check for `args_cli`. Removing these allows the seed to be
correctly set via CLI.

## Type of change

- Bug fix (non-breaking change which fixes an issue)

## Checklist

- [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with
`./isaaclab.sh --format`
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [ ] I have updated the changelog and the corresponding version in the
extension's `config/extension.toml` file
- [x] I have added my name to the `CONTRIBUTORS.md` or my name already
exists there
parent 2804ff3a
...@@ -47,6 +47,7 @@ Guidelines for modifications: ...@@ -47,6 +47,7 @@ Guidelines for modifications:
* Jia Lin Yuan * Jia Lin Yuan
* Jingzhou Liu * Jingzhou Liu
* Johnson Sun * Johnson Sun
* Kaixi Bao
* Kourosh Darvish * Kourosh Darvish
* Lorenz Wellhausen * Lorenz Wellhausen
* Masoud Moghani * Masoud Moghani
......
...@@ -67,7 +67,7 @@ def update_rsl_rl_cfg(agent_cfg: RslRlOnPolicyRunnerCfg, args_cli: argparse.Name ...@@ -67,7 +67,7 @@ def update_rsl_rl_cfg(agent_cfg: RslRlOnPolicyRunnerCfg, args_cli: argparse.Name
The updated configuration for RSL-RL agent based on inputs. The updated configuration for RSL-RL agent based on inputs.
""" """
# override the default configuration with CLI arguments # override the default configuration with CLI arguments
if hasattr("args_cli", "seed") and args_cli.seed is not None: if hasattr(args_cli, "seed") and args_cli.seed is not None:
agent_cfg.seed = args_cli.seed agent_cfg.seed = args_cli.seed
if args_cli.resume is not None: if args_cli.resume is not None:
agent_cfg.resume = args_cli.resume agent_cfg.resume = args_cli.resume
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment