Skip to content

Adds record at close functionality to the RecorderManager - #2826

Merged
kellyguo11 merged 15 commits into
isaac-sim:mainfrom
jtigue-bdai:jat/feat/add_recorder_write_at_close
Dec 10, 2025
Merged

kellyguo11 merged 15 commits into
isaac-sim:mainfrom
jtigue-bdai:jat/feat/add_recorder_write_at_close

Conversation

@jtigue-bdai

@jtigue-bdai jtigue-bdai commented Jun 30, 2025 •

Copy link
Copy Markdown
Collaborator

Description

Introducing a close function to the recorder manager which exports the data to file when the environment is closed and closes the recorder terms.

Fixes # (issue)

Type of change

  • New feature (non-breaking change which adds functionality)

Screenshots

Checklist

  • I have run the pre-commit checks with ./isaaclab.sh --format
  • I have made corresponding changes to the documentation
  • 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
  • I have added my name to the CONTRIBUTORS.md or my name already exists there

mmungai-bdai and others added 2 commits June 30, 2025 17:03
* flushing data to file when env closes

* formatting changes

* addressed changes requested in PR

* calling the del function for reward manager

* modified doc string

* add test for close function of recorder manager

* Update source/extensions/omni.isaac.lab/omni/isaac/lab/managers/recorder_manager.py

Co-authored-by: James Smith <[email protected]>

* minor docstring fix

---------

Co-authored-by: James Smith <[email protected]>
@jtigue-bdai
jtigue-bdai marked this pull request as ready for review June 30, 2025 21:09
@jtigue-bdai jtigue-bdai self-assigned this Jul 1, 2025

@ooctipus ooctipus left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@kellyguo11

Copy link
Copy Markdown
Contributor

@peterd-NV do you mind taking a quick look at this change to make sure it's ok for mimic?

@peterd-NV

Copy link
Copy Markdown
Collaborator

Hi @kellyguo11 @jtigue-bdai, I just have a couple of questions to make sure that everything will work with Mimic workflows:

  1. The new recorder manager close function will always be called during env.close(). This will result in whatever existing episode data for each env to be written to the dataset file. This will not overwrite any previously written data/episodes to the dataset file, correct?
  2. The current episode when recording manager close is called may not be a complete episode. For example, when doing multi-env data generation, there may be envs in the middle of an episode when the script is shutdown. In these cases, we do not want these episodes written to file. Can we continue to prevent the close function from writing the remaining incomplete episodes to file by using the episode_succeeded mechanism in the export_epsiodes function of the recorder manager?

@jtigue-bdai

Copy link
Copy Markdown
Collaborator Author

Hi @kellyguo11 @jtigue-bdai, I just have a couple of questions to make sure that everything will work with Mimic workflows:

  1. The new recorder manager close function will always be called during env.close(). This will result in whatever existing episode data for each env to be written to the dataset file. This will not overwrite any previously written data/episodes to the dataset file, correct?
  2. The current episode when recording manager close is called may not be a complete episode. For example, when doing multi-env data generation, there may be envs in the middle of an episode when the script is shutdown. In these cases, we do not want these episodes written to file. Can we continue to prevent the close function from writing the remaining incomplete episodes to file by using the episode_succeeded mechanism in the export_epsiodes function of the recorder manager?

Thanks @peterd-NV

  1. Correct this shouldn't affect any previous episode data.
  2. I believe it should still follow the same rules for recording as the original so the episode_succeeded should still function but what I don't know is if the success_results will be set if not entering the record_pre_reset. We could add a cfg parameter export_in_close to be able to toggle this though. Similar to the export_in_record_pre_reset.

@peterd-NV

Copy link
Copy Markdown
Collaborator

Thanks for the answers @jtigue-bdai.

Yes, if we could add a cfg parameter to toggle if export occurs in close that would be great. Ideally, if we could have this parameter default to be False that may be the safest option for existing Mimic workflow users. I believe most Mimic users are running parallel data generation/recording so having export in close default to False will guarantee their generated datasets don't contain unwanted incomplete demos.

Comment thread source/isaaclab/docs/CHANGELOG.rst Resolved
@jtigue-bdai

Copy link
Copy Markdown
Collaborator Author

@peterd-NV @kellyguo11 i have added the configuration parameter to this. Let me know what you think. Also i can't seem to get the recorder manager test to run locally for main or this branch. Anyone else having this issue?

@Mayankm96
Mayankm96 requested a review from peterd-NV December 8, 2025 16:08
@kellyguo11 kellyguo11 moved this to In review in Isaac Lab Dec 8, 2025
@github-actions github-actions Bot added the isaac-lab Related to Isaac Lab team label Dec 8, 2025
@jtigue-bdai

jtigue-bdai commented Dec 9, 2025 •

Copy link
Copy Markdown
Collaborator Author

@kellyguo11 is anyone else seeing timeouts for:
/workspace/isaaclab/source/isaaclab_rl/test/test_skrl_wrapper.py

I can't seem to replicate locally

@kellyguo11

Copy link
Copy Markdown
Contributor

hmm I haven't been noticing, let me trigger it again

@kellyguo11

Copy link
Copy Markdown
Contributor

I can't repro locally as well, likely not relevant to this PR.

@kellyguo11
kellyguo11 merged commit 755111c into isaac-sim:main Dec 10, 2025
@github-project-automation github-project-automation Bot moved this from In review to Done in Isaac Lab Dec 10, 2025
T-K-233 pushed a commit to ucb-bar/IsaacLab that referenced this pull request Dec 29, 2025
…2826)

# Description

Introducing a close function to the recorder manager which exports the
data to file when the environment is closed and closes the recorder
terms.

Fixes # (issue)

## Type of change

<!-- As you go through the list, delete the ones that are not
applicable. -->

- New feature (non-breaking change which adds functionality)

## Screenshots

## Checklist

- [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
- [x] I have added tests that prove my fix is effective or that my
feature works
- [x] 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

<!--
As you go through the checklist above, you can mark something as done by
putting an x character in it

For example,
- [x] I have done this task
- [ ] I have not done this task
-->

---------

Signed-off-by: James Tigue <[email protected]>
Signed-off-by: ooctipus <[email protected]>
Co-authored-by: Eva M. <[email protected]>
Co-authored-by: James Smith <[email protected]>
Co-authored-by: ooctipus <[email protected]>
Edify0991 pushed a commit to Edify0991/IsaacLab that referenced this pull request Jan 14, 2026
…2826)

# Description

Introducing a close function to the recorder manager which exports the
data to file when the environment is closed and closes the recorder
terms.

Fixes # (issue)

## Type of change

<!-- As you go through the list, delete the ones that are not
applicable. -->

- New feature (non-breaking change which adds functionality)

## Screenshots

## Checklist

- [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
- [x] I have added tests that prove my fix is effective or that my
feature works
- [x] 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

<!--
As you go through the checklist above, you can mark something as done by
putting an x character in it

For example,
- [x] I have done this task
- [ ] I have not done this task
-->

---------

Signed-off-by: James Tigue <[email protected]>
Signed-off-by: ooctipus <[email protected]>
Co-authored-by: Eva M. <[email protected]>
Co-authored-by: James Smith <[email protected]>
Co-authored-by: ooctipus <[email protected]>
nitesh-subedi pushed a commit to nitesh-subedi/IsaacLab that referenced this pull request Feb 5, 2026
…2826)

# Description

Introducing a close function to the recorder manager which exports the
data to file when the environment is closed and closes the recorder
terms.

Fixes # (issue)

## Type of change

<!-- As you go through the list, delete the ones that are not
applicable. -->

- New feature (non-breaking change which adds functionality)

## Screenshots

## Checklist

- [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
- [x] I have added tests that prove my fix is effective or that my
feature works
- [x] 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

<!--
As you go through the checklist above, you can mark something as done by
putting an x character in it

For example,
- [x] I have done this task
- [ ] I have not done this task
-->

---------

Signed-off-by: James Tigue <[email protected]>
Signed-off-by: ooctipus <[email protected]>
Co-authored-by: Eva M. <[email protected]>
Co-authored-by: James Smith <[email protected]>
Co-authored-by: ooctipus <[email protected]>
csj-275 pushed a commit to csj-275/IsaacLab that referenced this pull request Jul 8, 2026
…2826)

# Description

Introducing a close function to the recorder manager which exports the
data to file when the environment is closed and closes the recorder
terms.

Fixes # (issue)

## Type of change

<!-- As you go through the list, delete the ones that are not
applicable. -->

- New feature (non-breaking change which adds functionality)

## Screenshots

## Checklist

- [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
- [x] I have added tests that prove my fix is effective or that my
feature works
- [x] 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

<!--
As you go through the checklist above, you can mark something as done by
putting an x character in it

For example,
- [x] I have done this task
- [ ] I have not done this task
-->

---------

Signed-off-by: James Tigue <[email protected]>
Signed-off-by: ooctipus <[email protected]>
Co-authored-by: Eva M. <[email protected]>
Co-authored-by: James Smith <[email protected]>
Co-authored-by: ooctipus <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

isaac-lab Related to Isaac Lab team

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

5 participants