Skip to content

Read YAML streams independently of the system encoding - #9292

Merged
kellyguo11 merged 1 commit into
isaac-sim:mainfrom
sylvesterkaczmarek:fix/yaml-unicode-encoding
Dec 3, 2026
Merged

kellyguo11 merged 1 commit into
isaac-sim:mainfrom
sylvesterkaczmarek:fix/yaml-unicode-encoding

Conversation

@sylvesterkaczmarek

@sylvesterkaczmarek sylvesterkaczmarek commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor

Description

YAML reads currently use the system text encoding: UTF-16 configuration files fail on UTF-8 systems, and UTF-8 text can be silently misdecoded on legacy Windows locales. Read binary streams so PyYAML detects UTF-8 or BOM-marked UTF-16, and explicitly write UTF-8.

The runtime fix changes only the two file-opening calls. Consolidated the output-encoding regression into the existing save/load test, retained the parametrized Unicode-input test, and enabled kitless CI selection. Rebased onto current main, retaining tensor serialization support.

Compatibility

Legacy locale-encoded YAML must be converted to UTF-8 before loading. The changelog records this compatibility change and includes the required major-version marker.

Validation

  • All eight existing and consolidated YAML I/O cases passed.
  • Independently reverting binary input or explicit UTF-8 output makes the corresponding retained regression fail.
  • Full repository formatting and lint checks passed.

Release backport

  • Backport to release/3.1.0 after this pull request merges into main.

@sylvesterkaczmarek
sylvesterkaczmarek requested a review from a team November 28, 2026 20:21
@github-actions github-actions Bot added bug Something isn't working isaac-lab Related to Isaac Lab team labels Nov 28, 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), Style consistency (1), Test quality (2). Other reviewed categories look good.

  • PR description: The title and body match the loader, writer, tests, and changelog diff; eight cases match the reported validation count, and no performance claim or material runtime-cost change 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: binary loading rejects CP1252 YAML previously accepted on CP1252 systems; preserve warned legacy decoding during a deprecation cycle, document migration and removal timing, and cover both paths.
  • Implementation: Implementation looks good.
  • Style consistency: The public docstrings omit detected input encodings and UTF-8 output, leaving the changed contract unclear; document each behavior in its owning function.
  • Test quality: The dump round trip emits ASCII escapes and cannot detect the writer change; remove it while retaining distinct encoding-load cases and adding the required kitless marker.

Significant concerns. Posted 4 inline findings.

Automated review; human maintainers own approval decisions.

@greptile-apps

greptile-apps Bot commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor

Confidence Score: 4/5 · The PR appears safe to merge, with a non-blocking gap in the writer test.RetriggerView in GreptileConfidence Score: 4/5

[Medium impact] The change reaches shared YAML reads and writes across several configuration workflows.

The PR appears safe to merge, with a non-blocking gap in the writer test.

Findings

  1. P2 Writer encoding goes unchecked ▶

Summary

Makes YAML I/O independent of the system's default encoding.

  • YAML helpers read streams in their own encoding and save files as UTF-8.

Reviews (1) · Last reviewed commit: "Read YAML streams independently of the s..." · Reviewed by Greptile

@sylvesterkaczmarek

Copy link
Copy Markdown
Contributor Author

Thanks for the review. 2ddf860 preserves legacy locale input with a FutureWarning, documents both encodings, and routes tests to kitless CI. f4dd10b adds a file-boundary regression using a simulated non-UTF-8 default. All ten YAML tests passed in the isolated helper harness, and removing the explicit UTF-8 encoding makes the new regression fail.

@ooctipus
ooctipus force-pushed the fix/yaml-unicode-encoding branch from f4dd10b to 9f91cd9 Compare December 2, 2026 19:52
@ooctipus ooctipus self-assigned this Dec 2, 2026
@ooctipus ooctipus added the ci:run-docker Trigger the on-demand Docker and GPU CI workflow label Dec 2, 2026
@sylvesterkaczmarek

Copy link
Copy Markdown
Contributor Author

Thanks for the approval! I checked the latest CI logs. All eight YAML cases passed in the core shard. The remaining reds are the ARM rendering run (CUDA illegal memory access in Newton Warp rendering), three standalone demos (300-second exit timeouts), and the PhysX USD export test (1000-second timeout on Isaac-Ant). None of those logs shows a YAML encoding error. I have kept the approved YAML patch unchanged; could the failing jobs be rerun when convenient?

@kellyguo11
kellyguo11 merged commit 4d5efc9 into isaac-sim:main Dec 3, 2026
94 of 98 checks passed
kellyguo11 added a commit that referenced this pull request Dec 3, 2026
…ion (#9368)

## Description

Backport fourteen merged PRs to `release/3.1.0`:

| Original PR | Change |
| --- | --- |
| #9359 | Let CI recover after Warp and OVRTX cache eviction; allow
cold-cache demo startup. |
| #9292 | Detect UTF-8 and BOM-marked UTF-16 YAML input and write UTF-8
independently of the system locale. |
| #9346 | Update the Isaac Sim CI image digest to `6745f1725c9b`. |
| #9334 | Bind cloned deformable state and materials in clone-plan
environment order. |
| #9172 | Update and pin setup-uv and cache actions in performance CI. |
| #9062 | Resolve ray-caster mounts through shared frame views and fix
Kuka-Allegro camera mounts and missed-ray clipping. |
| #9247 | Use floating-point digital-filter coefficients when
configuration literals are integers. |
| #9285 | Support scalar shapes in uniform, triangular, and log-uniform
random sampling. |
| #9333 | Initialize OVPhysX physics consumers and joint-wrench bindings
before deferred render cloning. |
| #9366 | Add the success-guided reset sampling paper citation to the
NIST package docstring. |
| #9369 | Mark ARM64 OptiX rendering tests as expected failures without
starting the unsupported runtime. |
| #9365 | Fix documented GR00T N1.7 installation with explicit tyro and
Git LFS/source-override handling. |
| #9270 | Upgrade Newton, MuJoCo/MuJoCo Warp 4.1, Warp 1.20, USD
schemas, and LEAPP, with required runtime and converter compatibility
changes. |
| #9317 | Preserve convex-hull collider types when constructing the
implicit MPM solver. |

Cherry-picked with `-x`, preserving one commit per source PR. The first
six were applied in merge order (#9334, #9062, #9292, #9359, #9346,
#9172), followed by #9247, #9285, #9333, #9366, #9369, #9365, #9270, and
#9317. All fourteen applied without conflicts or manual edits. Every
stable patch ID matches its original merge commit. Original
documentation, regression tests, and changelog fragments are preserved.

### Compatibility

These are the original PRs in full, including their compatibility
changes and version markers:

- #9292: legacy locale-encoded YAML must be converted to UTF-8.
- #9062: ray casters require an existing mount frame; the old
Newton/OVPhysX synthetic mounting behavior is removed. The shared
FrameView transform API is added. Kuka-Allegro missed rays now clip at
2.5 m, changing observations seen by previously trained policies.
- #9333: removes unreleased internal binding-event plumbing; public
`PhysicsEvent.PHYSICS_READY` subscriptions and callback priorities
remain supported. This includes the lifecycle changes from the original
PR.

- #9270: upgrades core dependencies and includes breaking API removals.
Actuators use `command_interface` / `command_interface_state` and
`drive`; Newton sensors use solver observables. Removed options include
`MujocoCollisionCfg.solmix`, `MJWarpSolverCfg.update_data_interval` /
`ls_parallel`, and `KaminoPADMMCfg.compl_tolerance`;
`soft_contact_margin` becomes `soft_contact_gap`. Native MuJoCo CPU
simulation requires one world. The temporary MJCF converter patch and
original migration documentation are included. ARM OptiX requires an
R590+ driver; #9369 retains the expected failure on current ARM CI.

## Type of change

- Release backport: bug fixes, dependency upgrades, compatibility
changes, CI updates, tests, and documentation.

## Validation

Latest combined head: `1a2304c75`. The branch includes a merge of
release tip `7cfe2659f` in `9f60679bc`; existing changes from that merge
are preserved.

### Final combined-head checks

- Full repository formatting/lint, changelog validation against
`upstream/release/3.1.0`, and `git diff --check upstream/release/3.1.0`
passed at `1a2304c75`.
- #9317 applied without conflicts and its stable patch ID matches the
original. Its required Newton revision
`838ddf544927333559af894dfba0edb1a9efba04` is already locked through
#9270.
- Focused MPM tests were attempted with `uv run --no-sync python -m
pytest source/isaaclab_newton/test/physics/test_newton_solvers.py -k mpm
-q`; collection is blocked by the missing `isaaclab_newton` installation
in this macOS environment. The CUDA regression requires
supported-platform CI.

### Earlier thirteen-backport checks

- Full repository formatting/lint passed:
`ISAACLAB_CHANGELOG_BASE_REF=upstream/release/3.1.0 uv run --no-sync
isaaclab --format`.
- Changelog validation against `upstream/release/3.1.0` and `git diff
--check upstream/release/3.1.0` passed.
- #9270 applied without conflicts and its stable patch ID matches the
original. Its original dependency lock, wheel overrides, runtime
adaptations, tests, golden image, and changelog fragments are preserved.
- Root dependency metadata: **13 passed**; wheel-builder metadata: **14
passed**, using `uv run --no-sync python -m pytest` on the corresponding
CLI test files.
- Reset-state buffers: **7 passed, 1 skipped** in the existing macOS
environment. This environment still has Warp **1.17.0**, so this result
does not validate the new Warp 1.20 runtime.
- Confirmed the lock selects Warp 1.20.0, MuJoCo/MuJoCo Warp 4.1.0,
Newton USD schemas 0.8.0, and Newton revision
`838ddf544927333559af894dfba0edb1a9efba04`.
- Updated dependency installation, GPU simulation/rendering, and a clean
docs build remain unvalidated locally. Earlier runtime test results
below predate #9270 and do not establish compatibility with the upgraded
dependencies.

### Earlier twelve-backport checks

- Full repository formatting/lint, changelog validation against
`upstream/release/3.1.0`, and `git diff --check upstream/release/3.1.0`
passed at `26293b3bc`.
- #9365 applied without conflicts and its stable patch ID matches the
original. It changes only the GR00T installation documentation;
`pyproject.toml` and `uv.lock` are unchanged by this cherry-pick.
- The updated installation command block passed `bash -n`. External
GR00T installation and training were not rerun locally.
- Clean docs validation remains outstanding on a supported platform, as
detailed below.

### Earlier eleven-backport checks

- Full repository formatting/lint, changelog validation against
`upstream/release/3.1.0`, and `git diff --check upstream/release/3.1.0`
passed at `2a7783ebe`.
- #9369 applied without conflicts and its stable patch ID matches the
original.
- Evaluated the actual OptiX xfail decorator for `aarch64`, `arm64`,
`x86_64`, and `AMD64`: only ARM64 enables `xfail(run=False)`; Newton
Warp tests retain no xfail marker.
- GPU rendering was not rerun locally.

### Earlier ten-backport checks

The following checks passed at `97dc765f9`, before the test-marker-only
#9369 cherry-pick:

- Full repository formatting/lint checks passed:
`ISAACLAB_CHANGELOG_BASE_REF=upstream/release/3.1.0 uv run --no-sync
isaaclab --format`.
- Changelog check passed: `uv run --no-sync python
tools/changelog/cli.py check upstream/release/3.1.0 --include-worktree`.
- `git diff --check upstream/release/3.1.0` passed.
- All ten stable patch IDs match their source commits.
- Tensor processors: **13 passed**, using `uv run --no-sync python -m
pytest source/isaaclab/test/utils/test_tensor_processors.py -q`.
- Direct CPU checks passed for scalar, batched, and empty requests in
uniform, triangular, and log-uniform sampling, plus integer-coefficient
digital-filter unit-delay behavior. The scalar-sampling and
integer-coefficient bugs were reproduced before these fixes were added.
- The existing uv interpreter and imported core package were verified to
point at this checkout.

### Earlier six-backport checks

The following passed at `2afdfd8be`, before the four additional
cherry-picks, using `uv run --no-sync python -m pytest <file> -q`, one
file per process:

- YAML I/O: **8 passed**.
- Clone-plan algebra: **32 passed, 5 skipped**.
- Ray-caster kernels: **17 passed**.

### Remaining validation

- Validation used the existing uv environment on macOS because normal uv
resolution rejects this platform; the committed lockfile supports Linux
and Windows only.
- A clean docs build was attempted for the initial six-backport head
with `uv run --no-sync isaaclab --docs`; its nested uv invocation was
blocked by that platform restriction. The expanded documentation changes
still need a supported-platform build.
- GPU/OVPhysX/Newton simulation integration, including the #9333
lifecycle changes, and cold-cache demos have not been rerun locally for
this combined backport.
- No complete CI result is claimed for the latest combined head.

## Checklist

- [x] Read the contribution guidelines.
- [x] Run full repository formatting and lint checks.
- [x] Preserve original documentation, tests, and package changelog
fragments.
- [x] Verify all fourteen cherry-picks match the original patches.
- [x] Run focused locally supported checks.
- [ ] Complete clean docs and GPU integration validation on supported
platforms.

---------

Signed-off-by: Sylvester Kaczmarek <[email protected]>
Co-authored-by: ooctipus <[email protected]>
Co-authored-by: YuTeh Shen <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
Co-authored-by: Sylvester Kaczmarek <[email protected]>
Co-authored-by: hujc <[email protected]>
Co-authored-by: isaaclab-bot[bot] <282401363+isaaclab-bot[bot]@users.noreply.github.com>
Co-authored-by: fanes <[email protected]>
Co-authored-by: Richard Schmitt <[email protected]>
Co-authored-by: Mateo Guaman Castro <[email protected]>
Co-authored-by: Junnosuke Kamohara <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working ci:run-docker Trigger the on-demand Docker and GPU CI workflow isaac-lab Related to Isaac Lab team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants