Skip to content

Preserve iterable backend selections in nested dictionaries - #9239

Open
sylvesterkaczmarek wants to merge 2 commits into
isaac-sim:mainfrom
sylvesterkaczmarek:fix/nested-backend-iterator
Open

sylvesterkaczmarek wants to merge 2 commits into
isaac-sim:mainfrom
sylvesterkaczmarek:fix/nested-backend-iterator

Conversation

@sylvesterkaczmarek

Copy link
Copy Markdown
Contributor

Description

Materialize the array-type selection before recursive backend conversion so nested and sibling dictionaries receive the original selection, including when the caller passes an iterator.

Fixes #9238.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Validation

  • Iterator regression failed on main and passed after the fix; tuple behavior remains unchanged.
  • All 12 dictionary tests passed on CPU.
  • Changelog and diff checks passed.
  • Full formatting and simulator/GPU integration checks were not run.

Checklist

  • Read contribution guidelines.
  • Added focused regression coverage and changelog fragment.
  • Added contributor name.
  • Full formatting and integration checks.

Fixes isaac-sim#9238.

Signed-off-by: Sylvester Kaczmarek <16242628+sylvesterkaczmarek@users.noreply.github.com>
@sylvesterkaczmarek
sylvesterkaczmarek requested a review from a team November 25, 2026 23:59
@github-actions github-actions Bot added bug Something isn't working isaac-lab Related to Isaac Lab team labels Nov 25, 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: Compatibility and deprecation (1). Other reviewed categories look good.

  • PR description: The title and body match the conversion fix, regression coverage, changelog, and contributor entry; validation is reported rather than independently verified, 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: Breaking changes: tuple materialization exposes a later iterator exception instead of ValueError for an earlier unknown type, without a compatibility bridge; validate entries while collecting them to preserve failure behavior.
  • Implementation: Implementation looks good.
  • 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.

Comment thread source/isaaclab/isaaclab/utils/dict.py Outdated
tensor_type_conversions = TENSOR_TYPE_CONVERSIONS[backend]

# Materialize one-shot iterables before recursively processing nested dictionaries.
array_types = tuple(array_types)

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 · Compatibility — Validate before exhausting selections

If an iterable yields an unknown type and then raises, tuple() exposes the later exception instead of the documented ValueError. Validate each type while collecting it for recursion.

@greptile-apps

greptile-apps Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Confidence Score: 5/5 · The PR appears safe to merge.RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge.

Summary

convert_dict_to_backend now saves array_types as a tuple before reading it. Nested and sibling dictionaries can reuse selections supplied as one-shot iterators.

  • Nested dictionaries now convert arrays selected by one-shot iterators.
  • The contributor list now includes Sylvester Kaczmarek.

Reviews (1) · Last reviewed commit: "Preserve iterable backend selections in ..." · Reviewed by Greptile

@sylvesterkaczmarek

Copy link
Copy Markdown
Contributor Author

Addressed the iterator compatibility finding in 10697bd. Each selection is validated before reading the next entry, then the validated selections are retained for recursion. Added the invalid-first-entry regression; isolated execution of the actual conversion function with stand-in backend types passed both nested-conversion and validation-order checks.

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] Nested dictionary backend conversion loses iterator-based array type selections

1 participant