Skip to content

Conversation

Toni-SM
Copy link
Contributor

@Toni-SM Toni-SM commented Oct 7, 2025

Description

This PR address the following points:

  • Fix skrl train/play script configuration when using the --agent argument

    Example:

    python scripts/reinforcement_learning/skrl/train.py --task Isaac-Cart-Double-Pendulum-Direct-v0 --headless --agent skrl_mappo_cfg_entry_point

    Error:

    [INFO]: Parsing configuration from: isaaclab_tasks.direct.cart_double_pendulum.cart_double_pendulum_env:CartDoublePendulumEnvCfg
    [INFO]: Parsing configuration from: /home/toni/Documents/RL/toni_IsaacLab/source/isaaclab_tasks/isaaclab_tasks/direct/cart_double_pendulum/agents/skrl_mappo_cfg.yaml
    [INFO] Logging experiment in directory: /home/toni/Documents/RL/toni_IsaacLab/logs/skrl/cart_double_pendulum_direct
    Error executing job with overrides: []
    Traceback (most recent call last):
      File "/home/toni/Documents/RL/toni_IsaacLab/source/isaaclab_tasks/isaaclab_tasks/utils/hydra.py", line 101, in hydra_main
        func(env_cfg, agent_cfg, *args, **kwargs)
      File "/home/toni/Documents/RL/toni_IsaacLab/scripts/reinforcement_learning/skrl/train.py", line 156, in main
        log_dir = datetime.now().strftime("%Y-%m-%d_%H-%M-%S") + f"_{algorithm}_{args_cli.ml_framework}"
                                                                    ^^^^^^^^^
    NameError: name 'algorithm' is not defined
    
  • Replace STATES by OBSERVATIONS when defining skrl's agent configuration model inputs to ensure a smooth and error-free transition when the new mayor version of skrl gets released. In such mayor version OBSERVATIONS and STATES have different value/usage.

Type of change

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

@github-actions github-actions bot added isaac-lab Related to Isaac Lab team infrastructure labels Oct 7, 2025
@Mayankm96 Mayankm96 moved this to In progress in Isaac Lab Oct 10, 2025
@Mayankm96 Mayankm96 moved this from In progress to In review in Isaac Lab Oct 10, 2025
@kellyguo11 kellyguo11 changed the title Fix skrl train/play script configurations when using the --agent argument and rename agent configuration variable Fixes skrl train/play script configurations when using the --agent argument and rename agent configuration variable Oct 13, 2025
@kellyguo11 kellyguo11 merged commit a77910b into isaac-sim:main Oct 14, 2025
7 of 9 checks passed
@github-project-automation github-project-automation bot moved this from In review to Done in Isaac Lab Oct 14, 2025
@Toni-SM Toni-SM deleted the toni/skrl_version_restriction branch October 14, 2025 20:27
kellyguo11 pushed a commit that referenced this pull request Oct 15, 2025
…argument and rename agent configuration variable (#3643)

# Description

This PR address the following points:
* Fix skrl train/play script configuration when using the `--agent`
argument

    Example:

    ```bash
python scripts/reinforcement_learning/skrl/train.py --task
Isaac-Cart-Double-Pendulum-Direct-v0 --headless --agent
skrl_mappo_cfg_entry_point
    ```

    Error:

    ```
[INFO]: Parsing configuration from:
isaaclab_tasks.direct.cart_double_pendulum.cart_double_pendulum_env:CartDoublePendulumEnvCfg
[INFO]: Parsing configuration from:
/home/toni/Documents/RL/toni_IsaacLab/source/isaaclab_tasks/isaaclab_tasks/direct/cart_double_pendulum/agents/skrl_mappo_cfg.yaml
[INFO] Logging experiment in directory:
/home/toni/Documents/RL/toni_IsaacLab/logs/skrl/cart_double_pendulum_direct
    Error executing job with overrides: []
    Traceback (most recent call last):
File
"/home/toni/Documents/RL/toni_IsaacLab/source/isaaclab_tasks/isaaclab_tasks/utils/hydra.py",
line 101, in hydra_main
        func(env_cfg, agent_cfg, *args, **kwargs)
File
"/home/toni/Documents/RL/toni_IsaacLab/scripts/reinforcement_learning/skrl/train.py",
line 156, in main
log_dir = datetime.now().strftime("%Y-%m-%d_%H-%M-%S") +
f"_{algorithm}_{args_cli.ml_framework}"
^^^^^^^^^
    NameError: name 'algorithm' is not defined
    ```
 
* Replace `STATES` by `OBSERVATIONS` when defining skrl's agent
configuration model inputs to ensure a smooth and error-free transition
when the new mayor version of **skrl** gets released. In such mayor
version `OBSERVATIONS` and `STATES` have different value/usage.

## Type of change

<!-- As you go through the list, delete the ones that are not
applicable. -->

- Bug fix (non-breaking change which fixes an issue)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

infrastructure isaac-lab Related to Isaac Lab team

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants