Repository navigation
Conversation
There was a problem hiding this comment.
Isaac Lab Review Bot
Needs attention: Scope and over-engineering (1), Compatibility and deprecation (1), Implementation (1), Style consistency (5), Test quality (3). Other reviewed categories look good.
- PR description: The title matches the diff and validation is reported; shorten method and bit inventories, qualify allocation claims as overflow-specific, and remove the unsupported no-new-synchronization claim while preserving template sections.
- Design and architecture: Architecture looks good.
- Scope and over-engineering: Minimal implementation: Extend NewtonSolver, NewtonBackend, NewtonManager, and MJWarpSolver; no source modules were added, so none require merging or deletion. Keep allocation, output retention, decoding, and deduplication; collapse the index-and-gather reduction into a direct mask reduction, allocating world indices only for new warnings. Scope is cohesive; no split recommended.
- API: API changes look good.
- Compatibility and deprecation: Breaking changes: debug mode adds diagnostic kinds to get_solver_observables() and returns outputs without caller requests; no deprecation bridge exists, so preserve the getter’s requested-only result.
- Implementation: Warning counts include the global slot and worlds containing only previously reported bits, misattributing newly named overflows; filter by new_bits and report the global slot separately.
- Style consistency: Defaulted getattr hides a missing known overflow field; check container or kind absence explicitly, then use direct field access.
- Test quality: The CPU capability test restates a private declaration and cannot detect incorrect initialization requests; replace it with an initialization-boundary assertion while retaining distinct physical-overflow and warning-decoding coverage.
Significant concerns. Posted 11 inline findings.
Automated review; human maintainers own approval decisions.
[Low impact] The change reaches debug-mode MJWarp runs using the Warp backend. The PR appears safe to merge, with a non-blocking gap in overflow warnings for coupled MJWarp entries. Findings
SummaryAdds named MJWarp overflow warnings when
Diagram%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Initialize solver] --> B{Debug mode?}
B -->|Yes| C[Request driver diagnostic outputs]
B -->|No| D[Keep caller-requested outputs only]
C --> E[Allocate combined outputs]
D --> E
E --> F[Run solver substeps]
F --> G[Check final outputs outside capture]
G --> H[Warn once per new overflow bit]
Reviews (1) · Last reviewed commit: "Report MJWarp capacity overflows in debu..." · Reviewed by Greptile |
Signed-off-by: KuNaL8103 <kunaldabbe2003@gmail.com>
7018ce9 to
2e9e2b3
Compare
|
Hello Reviewers, gentle ping on this PR whenever someone has a moment to review and approve the CI workflow run.
|
kellyguo11
left a comment
There was a problem hiding this comment.
Thanks for the feature, this could be very useful for debugging! Do you think we can propose some of the generic features upstream to Newton? Maintaining the hardcoded list in Isaac Lab can be brittle against changes in Newton and other Newton users can also benefit from this.
Signed-off-by: KuNaL8103 <kunaldabbe2003@gmail.com>
|
Thanks for the review @kellyguo11, that's a great point! In this PR, I pushed d80d129 to remove the hardcoded 12-entry The only remaining coupling is calling |
|
Thanks, that sounds like a great proposal. We can also work with the Newton team to get their feedback on the Newton side API. |
|
@kellyguo11 I just opened the upstream feature request in Newton here: newton-physics/newton#5708 and will prepare a PR on |
|
Thanks for this, it's useful for us. One thing we noticed after d80d129: the pinned mujoco-warp also sets Nothing was dropped there, so the advice points at the wrong setting. Masking those two bits out of the capacity report (or logging them separately as non-convergence) would fix it. Repro without a GPU: the existing Separately, we have a small opt-in follow-up (report or raise on overflow outside debug mode) proposed in #9345 so it doesn't widen this PR. |
Signed-off-by: KuNaL8103 <kunaldabbe2003@gmail.com>
|
Good catch @tianyaohu, thanks! I pushed 340ca68 to mask |
Description
Fixes #8801.
MJWarp can silently drop contacts or constraints when a capacity buffer overflows (
nconmax,njmax, the Newton collision pipeline contact buffer, or a MuJoCo Warp buffer). Newton prints an unstructured line that is easy to miss in training logs, after which the simulation can misbehave or produce NaNs.This adds a debug-mode overflow diagnostic for MJWarp (
use_mujoco_cpu=False):NewtonCfg.debug_mode=True, solver initialization allocatesSolverMuJoCo.ObservableKind.OVERFLOWas an internal step-diagnostic output while keepingNewtonManager.get_solver_observables()restricted to caller-requested observables.MJWarpSolver.check_step()reduces the(world_count + 1,)int32overflow mask, decodes newly observed NewtonOverflowBits(nconmax,rigid_contact_max) and MuJoCo WarpOverflowTypebits (njmax,njmax_nnz, broadphase, narrowphase, CCD, etc.), and emits onelogger.warningper newly exhausted buffer per solver instance.debug_mode=False) does not allocate the overflow diagnostic observable or read the overflow buffer. Only the final solver substep is inspected bycheck_step().Example warning:
Documentation was updated in
docs/source/how-to/solver_tuning_mjwarp.rst, and a changelog fragment was added undersource/isaaclab_newton/changelog.d/.Type of change
Screenshots
Not applicable. This is a log-only diagnostic; no visual or rendered output changed.
Validation
Commands run from the repository root:
Checklist
pre-commitchecks withuv run isaaclab --formatsource/<pkg>/changelog.d/for every touched packageCONTRIBUTORS.md