Repository navigation
Conversation
There was a problem hiding this comment.
Isaac Lab Review Bot
Needs attention: Design and architecture (1), Compatibility and deprecation (10), Implementation (3), Style consistency (5), Test quality (2). Other reviewed categories look good.
- PR description: Qualify default-step parity as recorder-free; make the quoted timing reproducible with baseline/candidate revisions, command, hardware, backend, environment count, warmup, and metric, while preserving the template sections.
- Design and architecture: The locomanipulation payload schema has one script consumer but remains in the environment module; move its conversion beside generate_data.py's capture call.
- Scope and over-engineering: No over-engineering issues.
- API: API changes look good.
- Compatibility and deprecation: Breaking changes: recording configuration, hooks, imports, extensions, Mimic construction and setup, teleoperation returns, and image filenames change without functional deprecation bridges; retain old behavior with targeted warnings, migration/removal guidance, and transition coverage.
- Implementation: Mimic metadata now reads raw actions before processing rather than the manager-owned action buffer, changing captured targets; process actions before deriving metadata.
- Style consistency: Several changed signatures add required recorder arguments without documenting them in existing Args sections; document each argument's storage and capture responsibility.
- Test quality: The new structural test requires legacy APIs to disappear and constrains private syntax, obstructing deprecation bridges and harmless reorganization; replace those assertions with transition behavior and independent storage-boundary checks.
Needs rework. Posted 21 inline findings.
Automated review; human maintainers own approval decisions.
|
|
||
| def _step_annotation(env, action: torch.Tensor, *, recorder: EpisodeRecorder): | ||
| """Replay one action and capture the fields used for Mimic annotations.""" | ||
| recorder.add_to_episodes("obs/datagen_info", get_datagen_info(env, action.to(env.device))) |
There was a problem hiding this comment.
🔴 Critical · Implementation — Capture processed Mimic targets
The former pre-step term derived target_eef_pose from action_manager.action after processing; this call uses raw input first. Process the action, then pass the manager's action to get_datagen_info.
| Please refer to the :class:`isaaclab.scene.InteractiveSceneCfg` class for more details. | ||
| """ | ||
|
|
||
| recorders: object = DefaultEmptyRecorderManagerCfg() |
There was a problem hiding this comment.
🔴 Critical · Compatibility — Keep configured recording functional
Removing recorders and environment lifecycle dispatch stops existing configured capture, reset, and export. Retain the old manager path, including Warp dispatch, with targeted warnings, migration guidance, and old/new tests through deprecation.
| "RewardTermCfg", | ||
| "TerminationTermCfg", | ||
| "ObservationManager", | ||
| "DatasetExportMode", |
There was a problem hiding this comment.
🔴 Critical · Compatibility — Retain public recorder import paths
Removing the manager module, types, and DatasetExportMode export breaks existing imports and recorder subclasses. Keep their original paths functional with targeted deprecation warnings, migration guidance, and transition tests.
| *manager* objects (``ObservationManager``, ``RewardManager``, ``TerminationManager``, | ||
| ``EventManager``, ``CurriculumManager``, ``CommandManager``, ``ActionManager``, | ||
| ``RecorderManager``). Each manager is driven by small, reusable MDP term functions that live | ||
| ``EventManager``, ``CurriculumManager``, ``CommandManager``, ``ActionManager``). Each manager is driven by small, reusable MDP term functions that live |
There was a problem hiding this comment.
🟡 Warning · Style Consistency — Wrap the shortened manager list
The edited list and following sentence now occupy one overlong source line. Break after the list to match the surrounding documentation layout.
| from isaaclab.utils.datasets import EpisodeData, EpisodeRecorder, EpisodeRecorderCfg, HDF5DatasetFileHandler | ||
|
|
||
| import isaaclab_mimic.envs # noqa: F401 | ||
| from isaaclab_mimic.datagen.generation import get_datagen_info |
There was a problem hiding this comment.
🟡 Warning · Implementation — Defer Mimic runtime imports
Importing generation before launch imports runtime environment code, contrary to this script's deferred-import boundary. Import it after launch; do the same for consolidated_demo and generate_data's new environment-module import.
| } | ||
|
|
||
| return "locomanipulation_sdg_output_data", output_data_dict | ||
| def locomanipulation_sdg_output_data(output_data: LocomanipulationSDGOutputData) -> tuple[str, dict]: |
There was a problem hiding this comment.
🟡 Warning · Design Architecture — Keep the payload in its workflow
Only generate_data.py consumes this dataset payload, yet its schema remains in the environment module. Move the conversion beside that script's capture call.
| filename = ( | ||
| f"{image_path}_{data_type}_trial_{total_successes}_tile_{tile}_step_{env.common_step_counter}.png" | ||
| ) | ||
| filename = f"{image_path}_{data_type}_tile_{tile}_step_{env.common_step_counter}.png" |
There was a problem hiding this comment.
🟡 Warning · Compatibility — Preserve documented image names
Removing the trial component changes filenames produced by save_image_to_file and contradicts its documented format. Keep legacy naming during a warned transition before switching formats.
| def create_environment_config( | ||
| output_dir: str, output_file_name: str | ||
| ) -> tuple[ManagerBasedRLEnvCfg | DirectRLEnvCfg, object | None, IsaacTeleopCfg | DeviceCfg]: | ||
| ) -> tuple[ManagerBasedRLEnvCfg | DirectRLEnvCfg, object | None, IsaacTeleopCfg | DeviceCfg, EpisodeRecorderCfg]: |
There was a problem hiding this comment.
🟡 Warning · Compatibility — Preserve teleop setup return
create_environment_config now returns four values instead of three, breaking existing unpacking callers. Retain the three-value interface through a warned transition and expose recorder settings separately.
| env_cfg.recorders.dataset_export_dir_path = output_dir | ||
| env_cfg.recorders.dataset_filename = output_file_name | ||
| env_cfg.recorders.dataset_export_mode = DatasetExportMode.EXPORT_SUCCEEDED_ONLY | ||
| recorder_cfg = load_cfg_from_registry(args_cli.task, "demo_recorder_cfg_entry_point") |
There was a problem hiding this comment.
🟡 Warning · Compatibility — Execute registered capture terms
The registered demo recorder configuration can contain custom terms, but the fixed workflow step uses only its output settings. Preserve configured fields during deprecation instead of silently omitting them.
|
|
||
|
|
||
| def process_success_condition( | ||
| env: gym.Env, recorder: EpisodeRecorder, success_term: object | None, success_step_count: int |
There was a problem hiding this comment.
🟡 Warning · Style Consistency — Document teleop recorder arguments
process_success_condition, handle_reset, and run_simulation_loop add recorder arguments but omit them from their Google-style Args sections. Document the shared storage and each function's use.
[High impact] The PR changes how episode data is collected across several simulation and dataset workflows. Fix the ignored custom step setting in the Warp frontend before merging. FindingsSummaryAdds
Diagram%%{init: {'theme': 'neutral'}}%%
flowchart LR
A[Environment configuration] --> B{Frontend}
B -->|Torch| C[Bind custom step when configured]
B -->|Warp| D[Run Warp step]
E[Recording workflow] --> F[Apply actions and advance physics]
F --> G[Capture fields]
G --> H[EpisodeRecorder]
H --> I[Export or discard episode]
I --> J[Reset and capture initial state]
Reviews (1) · Last reviewed commit: "Keep recording steps in their workflows" · Reviewed by Greptile |
| if self.cfg.step_fn is not None: | ||
| self.step = MethodType(self.cfg.step_fn, self) |
There was a problem hiding this comment.
With --frontend=warp, step_fn is silently ignored. That frontend creates ManagerBasedRLEnvWarp, which accepts ManagerBasedRLEnvCfg but does not inherit from ManagerBasedRLEnv or run this binding. Tasks therefore run the ordinary Warp step instead of their configured behavior. Bind the function in the Warp constructor too, or reject the setting there with a clear error.
| def test_configured_step_owns_execution_per_environment(monkeypatch): | ||
| """A configured step receives its environment and bypasses the default stepping pipeline.""" |
There was a problem hiding this comment.
Recording steps lack regression tests
The new binding test uses a stub step, and the storage tests never call the six new workflow step functions. Each workflow now owns physics timing, capture, export, and reset ordering. The current tests cannot catch a misplaced capture call, a wrong export flag, or an extra physics step. Preserve the isolated workflow checks described in the PR as repeatable tests.
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
b5c110f to
999bfc6
Compare
|
run-ci |
Description
Manager-based RL environments can take a complete custom step function through
env_cfg.step_fn. The default step keeps the decimation loop, rewards, terminations, resets, commands, events, and observations visible in one function.Recording workflows define their own step in the script or entry point that runs them. Each owns its decimation loop and makes direct capture calls where the workflow needs them. Teleoperation evaluates success over consecutive control steps. Mimic owns generation and annotation boundaries. The locomanipulation scripts export on task termination. The shared capture module reads fields and metadata, and
EpisodeRecorderowns batched storage and HDF5 export.Removed
RecorderManager, its term and configuration classes, and environment-owned recording from step, reset, reset-to-state, and close. The architecture test guards both the environment and capture module boundaries. The documentation shows the actual teleoperation step and where a script can insert per-physics-step capture.No unmerged dependencies.
Migration
This removes
env.recorder_managerandenv_cfg.recorders. InstantiateEpisodeRecorderand importDatasetExportModefromisaaclab.utils.datasets. Define the step in your script and call the capture functions at your chosen points. For an explicit decimation loop, set backend decimation to one before the first environment step. Mimic generation APIs receive the recorder directly. Task image exports use the global step in filenames.Validation
Full Kit/PhysX, teleoperation CLI, XR, and GPU coverage remains for CI. Local Kit bootstrap requires interactive license acceptance.
Type of change