Skip to content

Commit 802ec5b

Browse files
authored
Moves IO descriptor log dir to logs (#3434)
# Description Since we recently added logdir into the environment cfg, we can also move the IO description directory to be a subfolder under logdir. ## Type of change - Breaking change (existing functionality will not work without user modification) ## Checklist - [x] I have read and understood the [contribution guidelines](https://isaac-sim.github.io/IsaacLab/main/source/refs/contributing.html) - [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with `./isaaclab.sh --format` - [x] I have made corresponding changes to the documentation - [x] My changes generate no new warnings - [ ] I have added tests that prove my fix is effective or that my feature works - [ ] I have updated the changelog and the corresponding version in the extension's `config/extension.toml` file - [x] I have added my name to the `CONTRIBUTORS.md` or my name already exists there
1 parent d5d5711 commit 802ec5b

File tree

8 files changed

+21
-18
lines changed

8 files changed

+21
-18
lines changed

scripts/reinforcement_learning/rl_games/train.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,10 +156,9 @@ def main(env_cfg: ManagerBasedRLEnvCfg | DirectRLEnvCfg | DirectMARLEnvCfg, agen
156156
obs_groups = agent_cfg["params"]["env"].get("obs_groups")
157157
concate_obs_groups = agent_cfg["params"]["env"].get("concate_obs_groups", True)
158158

159-
# set the IO descriptors output directory if requested
159+
# set the IO descriptors export flag if requested
160160
if isinstance(env_cfg, ManagerBasedRLEnvCfg):
161161
env_cfg.export_io_descriptors = args_cli.export_io_descriptors
162-
env_cfg.io_descriptors_output_dir = os.path.join(log_root_path, log_dir)
163162
else:
164163
omni.log.warn(
165164
"IO descriptors are only supported for manager based RL environments. No IO descriptors will be exported."

scripts/reinforcement_learning/rsl_rl/train.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,10 +141,9 @@ def main(env_cfg: ManagerBasedRLEnvCfg | DirectRLEnvCfg | DirectMARLEnvCfg, agen
141141
log_dir += f"_{agent_cfg.run_name}"
142142
log_dir = os.path.join(log_root_path, log_dir)
143143

144-
# set the IO descriptors output directory if requested
144+
# set the IO descriptors export flag if requested
145145
if isinstance(env_cfg, ManagerBasedRLEnvCfg):
146146
env_cfg.export_io_descriptors = args_cli.export_io_descriptors
147-
env_cfg.io_descriptors_output_dir = log_dir
148147
else:
149148
omni.log.warn(
150149
"IO descriptors are only supported for manager based RL environments. No IO descriptors will be exported."

scripts/reinforcement_learning/sb3/train.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,10 +143,9 @@ def main(env_cfg: ManagerBasedRLEnvCfg | DirectRLEnvCfg | DirectMARLEnvCfg, agen
143143
policy_arch = agent_cfg.pop("policy")
144144
n_timesteps = agent_cfg.pop("n_timesteps")
145145

146-
# set the IO descriptors output directory if requested
146+
# set the IO descriptors export flag if requested
147147
if isinstance(env_cfg, ManagerBasedRLEnvCfg):
148148
env_cfg.export_io_descriptors = args_cli.export_io_descriptors
149-
env_cfg.io_descriptors_output_dir = log_dir
150149
else:
151150
omni.log.warn(
152151
"IO descriptors are only supported for manager based RL environments. No IO descriptors will be exported."

scripts/reinforcement_learning/skrl/train.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,10 +173,9 @@ def main(env_cfg: ManagerBasedRLEnvCfg | DirectRLEnvCfg | DirectMARLEnvCfg, agen
173173
# get checkpoint path (to resume training)
174174
resume_path = retrieve_file_path(args_cli.checkpoint) if args_cli.checkpoint else None
175175

176-
# set the IO descriptors output directory if requested
176+
# set the IO descriptors export flag if requested
177177
if isinstance(env_cfg, ManagerBasedRLEnvCfg):
178178
env_cfg.export_io_descriptors = args_cli.export_io_descriptors
179-
env_cfg.io_descriptors_output_dir = os.path.join(log_root_path, log_dir)
180179
else:
181180
omni.log.warn(
182181
"IO descriptors are only supported for manager based RL environments. No IO descriptors will be exported."

source/isaaclab/config/extension.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22

33
# Note: Semantic Versioning is used: https://semver.org/
4-
version = "0.46.0"
4+
version = "0.46.1"
55

66
# Description
77
title = "Isaac Lab framework for Robot Learning"

source/isaaclab/docs/CHANGELOG.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
Changelog
22
---------
33

4+
0.46.1 (2025-09-10)
5+
~~~~~~~~~~~~~~~~~~~
6+
7+
Changed
8+
^^^^^^^
9+
10+
* Moved IO descriptors output directory to a subfolder under the task log directory.
11+
12+
413
0.46.0 (2025-09-06)
514
~~~~~~~~~~~~~~~~~~~
615

source/isaaclab/isaaclab/envs/manager_based_env.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -250,12 +250,13 @@ def export_IO_descriptors(self, output_dir: str | None = None):
250250
IO_descriptors = self.get_IO_descriptors
251251

252252
if output_dir is None:
253-
output_dir = self.cfg.io_descriptors_output_dir
254-
if output_dir is None:
255-
raise ValueError(
256-
"Output directory is not set. Please set the output directory using the `io_descriptors_output_dir`"
257-
" configuration."
258-
)
253+
if self.cfg.log_dir is not None:
254+
output_dir = os.path.join(self.cfg.log_dir, "io_descriptors")
255+
else:
256+
raise ValueError(
257+
"Output directory is not set. Please set the log directory using the `log_dir`"
258+
" configuration or provide an explicit output_dir parameter."
259+
)
259260

260261
if not os.path.exists(output_dir):
261262
os.makedirs(output_dir, exist_ok=True)

source/isaaclab/isaaclab/envs/manager_based_env_cfg.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,5 @@ class ManagerBasedEnvCfg:
129129
export_io_descriptors: bool = False
130130
"""Whether to export the IO descriptors for the environment. Defaults to False."""
131131

132-
io_descriptors_output_dir: str | None = None
133-
"""The directory to export the IO descriptors to. Defaults to None."""
134-
135132
log_dir: str | None = None
136133
"""Directory for logging experiment artifacts. Defaults to None, in which case no specific log directory is set."""

0 commit comments

Comments
 (0)