Repository navigation
Separate recorder capture from batched episode storage #8822
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
32a5d44
b27227c
09645f3
4b0d0b1
81c0eff
87bc5b2
11b8c77
70d4e53
c093160
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| * Replaced per-world recorder episode containers with batched field allocations and | ||
| independent insertion indices, reusing storage across resets and growing without dropping samples. | ||
| * Added :meth:`~isaaclab.managers.RecorderManager.get_term` for direct access to captured batches. | ||
| * Preserve slices through recorder reset callbacks and normalize Python sequences to lists so tuple | ||
| environment indices work for capture, reset and success updates. | ||
| * **Breaking:** Removed the implicit observation computation before RL post-step recorder callbacks. | ||
| Physical capture no longer consumes extra observation noise. Custom terms needing observations | ||
| of the completed transition must call ``env.observation_manager.compute_group(name, update_history=False)`` | ||
| explicitly; ``env.obs_buf`` still contains the preceding policy input. Use a noiseless group without | ||
| history or delay for current measurements that do not consume policy noise draws. | ||
| * **Breaking:** Changed :meth:`~isaaclab.managers.RecorderManager.get_episode` to return an owned | ||
| snapshot with tensor leaves. To update live recording, use ``add_to_episodes`` and | ||
| ``set_success_to_episodes``; do not mutate the snapshot. Set ``buffer_initial_capacity`` | ||
| to control the initial allocation per field. | ||
| * **Breaking:** Removed ``EpisodeData.add()`` and ``pre_export()``. Collection now belongs to | ||
| ``RecorderManager.add_to_episodes()``; assign nested tensors with leading sample dimensions | ||
| to ``EpisodeData.data`` when constructing an episode directly. Playback and HDF5 loading remain supported. | ||
| * **Breaking:** Removed the unused ``RecorderTerm.close(file_path)`` hook. Dataset handlers own | ||
| file finalization; applications must explicitly close any additional resources they own. | ||
|
|
||
| * Documented independent capture, retention and export choices, with task-selected schemas and | ||
| consumer-owned processing. Core recorder storage remains independent of task and learning packages. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| * Kept retained recorder allocations writable after leaving PyTorch inference mode, including | ||
| grown buffers and schema changes, so subsequent reset and export can finalize those episodes. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -236,10 +236,7 @@ def step(self, action: torch.Tensor) -> VecEnvStepReturn: | |
| self.reset_time_outs = self.termination_manager.time_outs | ||
| self.reward_buf = self.reward_manager.compute(dt=self.step_dt) | ||
|
|
||
| if len(self.recorder_manager.active_terms) > 0: | ||
| # update observations for recording if needed | ||
| self.obs_buf = self.observation_manager.compute() | ||
| self.recorder_manager.record_post_step() | ||
| self.recorder_manager.record_post_step() | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟡 Warning · Compatibility — Post-step recorders now see stale observations Removing the refresh means existing post-step terms reading env.obs_buf silently record the previous step's observations. Gate the new timing behind an opt-in or deprecation cycle covering both env packages. |
||
|
|
||
| # -- reset envs that terminated/timed-out and log the episode information | ||
| reset_env_ids = self.reset_buf.nonzero(as_tuple=False).squeeze(-1).int() | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this might be easy to miss. the assumption for pre and post seems different that pre obs is fresh but post is stale. Might prefer to have the behavior aligned to avoid problem. Or a cfg level switch to opt in/out
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as above, i think recoder manager put a bit too many hooks into managers, a better appoach would be instead of we expose the hook, we just let user compose the step function, and they can add the record in wherever they think its appropriate. this pr will just mostly be speed up