Repository navigation
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V9VCXCWxbWpvv9xug99qnz
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…de zero-weight encoders
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…de zero-weight encoders
qiayuanl
force-pushed
the
main
branch
2 times, most recently
from
November 16, 2026 23:15
76b6652 to
7e94b07
Compare
Retain upstream main triggers, the public mjlab checkout, and the updated lockfile. Preserve the focused fix and regression coverage.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Rounding each task count independently can overrun a small batch or assign the remainder to a zero-weight final task. For example, a one-element batch with weights
[0.5, 0.5, 0]is routed entirely to the disabled third encoder. NaN fractions also pass the current validation.Changes
Round cumulative boundaries to keep all task ranges contiguous, monotonic and within the batch. Validate finite weights before calculating ranges. Regression cases cover three/four task mixtures across 32 batch sizes, disabled tasks, accepted weight rounding tolerances at large batch sizes, and nonfinite configuration values.
Validation
PYTHONPATH=src python -m pytest --confcutdir=tests/standalone -q tests/standalone/test_task_slot_apportionment.pygit diff --checkpass.The focused CPU tests import the changed production module directly and use synthetic tensors. The required source is now publicly available at
HybridRobotics/mjlab_research. Full simulator/training integration was not run in this validation. The standalone test directory lets these independent checks run without the simulator fixtures.Earlier branch verification
Rechecked the published head
656531c8452ef8d0d6562aa20dc37b2ffba300aaagainst upstreammainatabc124c1bd5976341034668af3d12c087f2f1f55: the branch already contains this upstream commit. The focused CPU regression was rerun with Python 3.12.14, PyTorch 2.15.0+cpu and TensorDict 0.11.0: 8 passed in 3.02s. Complete Python 3.13 simulator and CUDA training validation was not run.Current integration verification (2026-11-26)
Published head:
c553b55312d5e80107d0b0541b815d3074cdafe3. Current upstreammain:5fb92297ab4fe3d86629d9f0c635334791bb0d5f. The local merge of this published head with that current main was validated; the local integration tree is90bfbe636e071014ba2f970aed6794c8338cf7cd. The upstream CI configuration is retained, and the feature diff remains limited to this PR's two original files.Focused CPU validation used Python 3.12.14, PyTorch 2.15.0+cpu and TensorDict 0.11.0:
test_task_slot_apportionment.py: 8 passed on the integrated tree.git diff --checkpass.Where the current environment module imports simulator task registration, the local harness isolates that import while retaining the exact production environment code and observation-builder implementation with real Torch/TensorDict. This is focused CPU regression coverage; complete Python 3.13 simulator and GPU training validation remains outstanding. Upstream Actions approval and completion remain necessary before relying on hosted CI.