• 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
..
ray Loading commit data...
rl_games Loading commit data...
rsl_rl Loading commit data...
sb3 Loading commit data...
skrl Loading commit data...