Skip to content

Commit 7bbe406

Browse files
authored
Merge branch 'xyao/exp/ci_stall' into xyao/exp/revert_eval_runner_tests
2 parents b59c562 + 867391f commit 7bbe406

6 files changed

Lines changed: 58 additions & 9 deletions

File tree

docs/pages/example_workflows/dexsuite_lift/step_2_policy_training.rst

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,29 @@ Hyperparameters can be overridden with Hydra-style CLI arguments:
6464
agent.max_iterations=20000 agent.save_interval=500 agent.algorithm.learning_rate=0.0005
6565
6666
67+
Resuming from a Checkpoint
68+
^^^^^^^^^^^^^^^^^^^^^^^^^^
69+
70+
To resume training from a previously saved checkpoint, use the ``--resume`` flag
71+
together with ``--load_run`` (run folder name) and ``--checkpoint`` (model filename).
72+
Both arguments are optional — when omitted, the most recent run and latest checkpoint
73+
are used automatically.
74+
75+
.. code-block:: bash
76+
77+
python submodules/IsaacLab/scripts/reinforcement_learning/rsl_rl/train.py \
78+
--task Isaac-Dexsuite-Kuka-Allegro-Lift-v0 \
79+
--num_envs 512 \
80+
--resume \
81+
--load_run <timestamp> \
82+
--checkpoint model_5000.pt \
83+
presets=newton presets=cube
84+
85+
Replace ``<timestamp>`` with the run folder name under ``logs/rsl_rl/dexsuite_kuka_allegro/``.
86+
If ``--load_run`` is omitted, the latest run is selected. If ``--checkpoint`` is omitted,
87+
the latest checkpoint in that run is loaded.
88+
89+
6790
Monitoring Training
6891
^^^^^^^^^^^^^^^^^^^
6992

docs/pages/example_workflows/dexsuite_lift/step_3_evaluation.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Once inside the container, set the models directory:
99

1010
.. code-block:: bash
1111
12-
export MODELS_DIR=models/isaaclab_arena/dexsuite_lift
12+
export MODELS_DIR=/models/isaaclab_arena/dexsuite_lift
1313
mkdir -p $MODELS_DIR
1414
1515
This step evaluates a checkpoint using Arena's ``dexsuite_lift`` environment.

docs/pages/example_workflows/reinforcement_learning/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ You'll need to create folders for logs, checkpoints, and models:
7272
7373
export LOG_DIR=logs/rsl_rl
7474
mkdir -p $LOG_DIR
75-
export MODELS_DIR=models/isaaclab_arena/reinforcement_learning
75+
export MODELS_DIR=/models/isaaclab_arena/reinforcement_learning
7676
mkdir -p $MODELS_DIR
7777
7878
Workflow Steps

docs/pages/example_workflows/reinforcement_learning/step_2_policy_training.rst

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,31 @@ For example, to train with relu activation and a higher learning rate:
6161
agent.algorithm.learning_rate=0.001
6262
6363
64+
Resuming from a Checkpoint
65+
^^^^^^^^^^^^^^^^^^^^^^^^^^
66+
67+
To resume training from a previously saved checkpoint, use the ``--resume`` flag
68+
together with ``--load_run`` (run folder name) and ``--checkpoint`` (model filename).
69+
Both arguments are optional — when omitted, the most recent run and latest checkpoint
70+
are used automatically.
71+
72+
.. code-block:: bash
73+
74+
python submodules/IsaacLab/scripts/reinforcement_learning/rsl_rl/train.py \
75+
--external_callback isaaclab_arena.environments.isaaclab_interop.environment_registration_callback \
76+
--task lift_object \
77+
--rl_training_mode \
78+
--num_envs 4096 \
79+
--max_iterations 4000 \
80+
--resume \
81+
--load_run <timestamp> \
82+
--checkpoint model_1999.pt
83+
84+
Replace ``<timestamp>`` with the run folder name under ``logs/rsl_rl/generic_experiment/``.
85+
If ``--load_run`` is omitted, the latest run is selected. If ``--checkpoint`` is omitted,
86+
the latest checkpoint in that run is loaded.
87+
88+
6489
Monitoring Training
6590
^^^^^^^^^^^^^^^^^^^
6691

@@ -101,6 +126,7 @@ During training, each iteration prints a summary to the console:
101126
ETA: 00:00:49
102127
103128
129+
104130
Multi-GPU Training
105131
^^^^^^^^^^^^^^^^^^
106132

@@ -112,7 +138,7 @@ Add ``--distributed`` to spread environments across all available GPUs:
112138
--external_callback isaaclab_arena.environments.isaaclab_interop.environment_registration_callback \
113139
--task lift_object \
114140
--rl_training_mode \
115-
--num_envs 4096\
141+
--num_envs 4096 \
116142
--max_iterations 2000 \
117143
--distributed
118144

docs/pages/example_workflows/reinforcement_learning/step_3_evaluation.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Once inside the container, set the models directory if you plan to download pre-
99

1010
.. code:: bash
1111
12-
export MODELS_DIR=models/isaaclab_arena/reinforcement_learning
12+
export MODELS_DIR=/models/isaaclab_arena/reinforcement_learning
1313
mkdir -p $MODELS_DIR
1414
1515
This tutorial assumes you've completed :doc:`step_2_policy_training` and have a trained checkpoint,

isaaclab_arena/tests/utils/subprocess.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,11 @@ def run_subprocess(
4242
) -> subprocess.CompletedProcess | None:
4343
"""Run a command in a subprocess with timeout.
4444
45-
``start_new_session=True`` isolates the child into its own process group.
46-
The child-side ``SimulationAppContext`` uses this to SIGTERM its entire
47-
group before ``os._exit()``, preventing orphaned Kit children (shader
48-
compiler, GPU workers, …) from holding GPU resources and blocking the
49-
next subprocess.
45+
The child is launched with ``start_new_session=True`` so it lives in its
46+
own process group. The child-side ``SimulationAppContext`` uses this to
47+
SIGTERM its entire group before ``os._exit()``, preventing orphaned Kit
48+
children (shader compiler, GPU workers, …) from holding GPU resources and
49+
blocking the next subprocess.
5050
5151
Args:
5252
cmd: Command to run (list of strings).

0 commit comments

Comments
 (0)