isaac-sim / IsaacLab

Unified framework for robot learning built on NVIDIA Isaac Sim
https://isaac-sim.github.io/IsaacLab
Other
2.32k stars 955 forks source link

[Bug Report] ` --checkpoint` broken #292

Closed VladimirFokow closed 1 month ago

VladimirFokow commented 8 months ago

Describe the bug

Here: https://isaac-orbit.github.io/orbit/source/setup/sample.html#reinforcement-learning

In this example:

./orbit.sh -p source/standalone/workflows/rsl_rl/play.py --task Isaac-Reach-Franka-v0 --num_envs 32 --checkpoint /PATH/TO/model.pth

we are supposed to provide /PATH/TO/model.pth

---------------------------------
Traceback (most recent call last):
  File "/home/fokow/work/Orbit/source/standalone/workflows/rsl_rl/play.py", line 106, in <module>
    main()
  File "/home/fokow/work/Orbit/source/standalone/workflows/rsl_rl/play.py", line 74, in main
    resume_path = get_checkpoint_path(log_root_path, agent_cfg.load_run, agent_cfg.load_checkpoint)
  File "/home/fokow/work/Orbit/source/extensions/omni.isaac.orbit_tasks/omni/isaac/orbit_tasks/utils/parse_cfg.py", line 209, in get_checkpoint_path
    raise ValueError(f"No checkpoints in the directory: '{run_path}' match '{checkpoint}'.")
ValueError: No checkpoints in the directory: '/home/fokow/work/Orbit/logs/rsl_rl/franka_reach/2024-03-15_21-08-21' match '/home/fokow/work/Orbit/logs/rsl_rl/franka_reach/2024-03-15_21-08-21'.

In this line the checkpoint is the full path of the checkpoint that was provided, that's why no matches are found.

System Info

Checklist

Related issue was discussed here, where they said:

Documentation is not the same as code. It does get a bit confusing.

Acceptance Criteria

This task is considered done if:

VladimirFokow commented 8 months ago

What should the logic be:

the code attempts to do both 😑 and achieves none.

Mayankm96 commented 8 months ago
  1. You are right about pth. That is an error.
  2. You need to specify the "load_run" and the "checkpoint" file (as the args say). The paths are resolved automatically
./orbit.sh -p source/standalone/workflows/rsl_rl/play.py --task Isaac-Rough-Anymal-C-Play-v0 --load_run 2024-03-11_16-11-38 --checkpoint model_300.pt

I agree. This is not very intuitive. Feel free to send an MR with the required clarifications :)