Repository navigation
Let task owners inject the ManagerBasedRlEnv class and keep pre-advance clip ownership in the tensor sampler - #2606
Open
Cudrix-dev wants to merge 1 commit into
Open
Cudrix-dev wants to merge 1 commit into
Cudrix-dev wants to merge 1 commit into
Conversation
Port the task-owned ManagerBasedRlEnv factory extension and pre-advance clip ownership semantics from the SONIC fork cded6de532ed854d47bab0f65cb012d4730d44cd onto UniLab v1.5.1 (13ba6bb). Preserve the full-width bool return ABI and stable sampler scratch buffers. Source: sonic_unilab/docs/patches/unilab_151_sonic_tensor_contract.patch; upstream code remains under its existing license. Add CPU boundary/lifecycle regressions. Validation: 158 passed, 6 skipped, 3 Go2-asset-dependent cases deselected; Ruff, mypy and pyright passed. No GPU validation. Refs unilabsim/sonic_unilab#30
This branch has not been deployed
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.
Summary
Two small contracts that downstream task packages rely on.
env_clsfactory injection: a task owner can supply its ownManagerBasedRlEnvsubclass to the Manager env factory, for example to add task-specific step hooks. It does not need to replace or monkeypatch the factory. The default staysManagerBasedRlEnv.MotionSamplerdecides clip ownership from the frame before advancing. A lane that reaches its clip end is reported done for that clip, and is not re-attributed to the next clip. The full-width bool return ABI and the stable sampler scratch buffers are unchanged.Tests
tests/envs/test_manager_based_rl_env.py: factory injection and the default path.tests/tasks/test_tensor_motion_sampler.py: clip boundary and lifecycle regressions.Origin
Ported from the SONIC downstream fork (commit authored by caozx1110, authorship kept), CPU-validated.