• Toni-SM's avatar
    Fixes skrl train/play script configurations when using the `--agent` argument... · a77910ba
    Toni-SM authored
    Fixes skrl train/play script configurations when using the `--agent` 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)
    a77910ba
Name
Last commit
Last update
.github Loading commit data...
.vscode Loading commit data...
apps Loading commit data...
docker Loading commit data...
docs Loading commit data...
scripts Loading commit data...
source Loading commit data...
tools Loading commit data...
.dockerignore Loading commit data...
.flake8 Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
.pre-commit-config.yaml Loading commit data...
CITATION.cff Loading commit data...
CONTRIBUTING.md Loading commit data...
CONTRIBUTORS.md Loading commit data...
LICENSE Loading commit data...
LICENSE-mimic Loading commit data...
README.md Loading commit data...
SECURITY.md Loading commit data...
VERSION Loading commit data...
environment.yml Loading commit data...
isaaclab.bat Loading commit data...
isaaclab.sh Loading commit data...
pyproject.toml Loading commit data...
pytest.ini Loading commit data...