You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
convert_dict_to_backend() accepts an iterable of array types. When the iterable is a one-shot iterator, the outer call consumes it while parsing the requested types. Recursive calls receive the exhausted iterator, so nested arrays remain in their original backend.
Expected: the nested NumPy array becomes a Torch tensor, just as when passing a tuple. Actual: the assertion fails.
System Info
main at ebf162a, macOS ARM64, Python 3.12, PyTorch 2.12.0. No Isaac Sim or CUDA required.
Additional context
Materialize the selection once as a tuple before parsing it and passing it to recursive calls. A parameterized regression covers tuples and iterators across the outer dictionary, nested dictionaries, and sibling branches. All 12 dictionary tests pass after the fix.
Thanks, @RandomOakForest, for confirming the iterator issue. All 13 dictionary tests pass with the updated #9239 implementation. It also preserves the earlier ValueError when an iterator yields an invalid type before a subsequent exception. Scoped Ruff lint and formatting now pass.
Activity
RandomOakForest commentedon Dec 2, 2026
Thanks, I confirmed the iterator case on main and #9239 fixes it.
sylvesterkaczmarek commentedon Dec 2, 2026
Thanks, @RandomOakForest, for confirming the iterator issue. All 13 dictionary tests pass with the updated #9239 implementation. It also preserves the earlier ValueError when an iterator yields an invalid type before a subsequent exception. Scoped Ruff lint and formatting now pass.