Skip to content

Update rsl-rl-lib version constraint to fix ValueError when start training.#47

Open
CMBill wants to merge 1 commit intoHellod035:mainfrom
CMBill:patch-1
Open

Update rsl-rl-lib version constraint to fix ValueError when start training.#47
CMBill wants to merge 1 commit intoHellod035:mainfrom
CMBill:patch-1

Conversation

@CMBill
Copy link

@CMBill CMBill commented Dec 25, 2025

开始训练时报错:

Traceback (most recent call last):
  File "/home/c112/codes/LeggedLab/legged_lab/scripts/train.py", line 101, in <module>
    train()
  File "/home/c112/codes/LeggedLab/legged_lab/scripts/train.py", line 85, in train
    runner = OnPolicyRunner(env, agent_cfg.to_dict(), log_dir=log_dir, device=agent_cfg.device)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/c112/miniconda3/envs/LeggedLab/lib/python3.11/site-packages/rsl_rl/runners/on_policy_runner.py", line 45, in __init__
    self.cfg["obs_groups"] = resolve_obs_groups(obs, self.cfg["obs_groups"], default_sets)
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/c112/miniconda3/envs/LeggedLab/lib/python3.11/site-packages/rsl_rl/utils/utils.py", line 252, in resolve_obs_groups
    raise ValueError(
ValueError: The observation configuration dictionary 'obs_groups' must contain the 'policy' key. Found keys: []

后尝试使用低于3.0版本的rsl_rl包测试发现没有报错,应该是rsl_rl包的版本问题,于是修改了setup.pyinstall_requires里对rsl-rl-lib的版本要求,添加了<3.0.0

目前不确定较早的3.0版本的rsl_rl包是否报错,但是2.0版本中最新的2.3.3是没问题的。

Copilot AI review requested due to automatic review settings December 25, 2025 05:48
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a ValueError that occurs when starting training with rsl-rl-lib version 3.0.0 or higher by adding an upper bound version constraint to exclude incompatible versions. The error was caused by breaking API changes in rsl-rl 3.0+ that expect an 'obs_groups' configuration with a 'policy' key that is not being provided by the current codebase.

Key Changes:

  • Constrained rsl-rl-lib dependency to versions >=2.3.0 and <3.0.0 to avoid incompatibility issues with version 3.0+

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@CMBill
Copy link
Author

CMBill commented Dec 25, 2025

found issue #38

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants