Skip to content

Skip occupied IDs when appending HDF5 episodes - #9342

Open
weakriver3000 wants to merge 2 commits into
isaac-sim:mainfrom
weakriver3000:fix/hdf5-automatic-demo-id
Open

weakriver3000 wants to merge 2 commits into
isaac-sim:mainfrom
weakriver3000:fix/hdf5-automatic-demo-id

Conversation

@weakriver3000

Copy link
Copy Markdown

Fixes #9341.

Automatic episode numbering skips occupied IDs. Explicit duplicate IDs still raise ValueError, and the episode count includes explicitly numbered entries.

The regression test reproduces the collision after reopening the file and verifies that the append preserves the existing episode. The HDF5 test file had 5 passes and 1 POSIX-only test skipped on Windows. All applicable repository-wide pre-commit checks passed.

@weakriver3000
weakriver3000 requested a review from a team December 2, 2026 07:04
@github-actions github-actions Bot added bug Something isn't working isaac-lab Related to Isaac Lab team labels Dec 2, 2026

@isaaclab-review-bot isaaclab-review-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Isaac Lab Review Bot

Needs attention: Implementation (1). Other reviewed categories look good.

  • PR description: The title and body match the numbering fix, count correction, changelog, and reopen regression; reported Windows validation is scoped clearly, and no measurable performance claim requires benchmarks.
  • Design and architecture: Architecture looks good.
  • Scope and over-engineering: No over-engineering issues.
  • API: API changes look good.
  • Compatibility and deprecation: No breaking changes identified.
  • Implementation: The shared duplicate guard repeats an HDF5 lookup after automatic allocation establishes absence; move that guard into the explicit-ID branch.
  • Style consistency: Style consistency looks good.
  • Test quality: Test quality looks good.

Minor fixes needed. Posted 1 inline finding.

Automated review; human maintainers own approval decisions.

next_demo_id = self._next_demo_id
while f"demo_{next_demo_id}" in self._hdf5_data_group:
next_demo_id += 1
episode_group_name = f"demo_{next_demo_id}"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Warning · Implementation — Avoid the second membership lookup

The loop establishes that the automatic ID is free, but the shared duplicate check queries HDF5 again on every automatic write. Check duplicates only in the explicit-ID branch.

@greptile-apps

greptile-apps Bot commented Dec 2, 2026 •

Copy link
Copy Markdown
Contributor

Confidence Score: 5/5RetriggerView in Greptile

[Medium impact] The PR appears safe to merge; both automatic and explicit writes remain protected against occupied IDs.

Summary

Automatic HDF5 episode IDs skip occupied names, while explicitly numbered episodes count toward the total.

  • Automatic episode writes skip IDs already used in the file.

Reviews (2) · Last reviewed commit: "Avoid redundant HDF5 episode ID lookup" · Reviewed by Greptile

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working isaac-lab Related to Isaac Lab team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug Report] Automatic HDF5 episode IDs can collide after reopening a dataset

1 participant