-
Notifications
You must be signed in to change notification settings - Fork 3.8k
[CI] Stabilize the Newton environment smoke tests and run them kit-less #6804
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
hujc7
wants to merge
1
commit into
isaac-sim:develop
Choose a base branch
from
hujc7:jichuanh/usd-core-physics-parser-race
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
3 changes: 3 additions & 0 deletions
3
source/isaaclab_tasks/changelog.d/jichuanh-newton-env-tests-kitless.skip
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| Test-only: ran the Newton environment smoke tests kit-less, split the Kit-requiring tasks into | ||
| their own file, and limited OpenUSD's work-thread pool to work around the usd-core<26.5 physics | ||
| parser race that aborted the process during the Newton USD import. | ||
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
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
47 changes: 47 additions & 0 deletions
47
source/isaaclab_tasks/test/core/test_parse_env_cfg_presets.py
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| # Copyright (c) 2022-2026, The Isaac Lab Project Developers (https://github.com/isaac-sim/IsaacLab/blob/main/CONTRIBUTORS.md). | ||
| # All rights reserved. | ||
| # | ||
| # SPDX-License-Identifier: BSD-3-Clause | ||
|
|
||
| """Tests that :func:`parse_env_cfg` honors a requested preset selection. | ||
|
|
||
| A selection has to be supplied while the ``PresetCfg`` wrappers are being resolved: the returned | ||
| config no longer carries the alternatives, so applying a preset afterwards silently keeps the | ||
| default. These cases use tasks whose default backend is *not* the requested one, so a dropped | ||
| selection fails instead of coincidentally matching. | ||
| """ | ||
|
|
||
| import pytest | ||
| from isaaclab_newton.physics import NewtonCfg | ||
| from isaaclab_physx.physics import PhysxCfg | ||
|
|
||
| import isaaclab_tasks # noqa: F401 | ||
| from isaaclab_tasks.utils.parse_cfg import parse_env_cfg | ||
|
|
||
| pytestmark = pytest.mark.unit | ||
|
|
||
| # Defaults to PhysX and offers a newton_mjwarp preset, so the selection has to do real work. | ||
| _PHYSX_DEFAULT_TASK = "Isaac-Velocity-Flat-G1" | ||
|
|
||
|
|
||
| def test_parse_env_cfg_defaults_to_the_preset_default() -> None: | ||
| """Without a selection, a wrapper still resolves to its default.""" | ||
| env_cfg = parse_env_cfg(_PHYSX_DEFAULT_TASK) | ||
|
|
||
| assert isinstance(env_cfg.sim.physics, PhysxCfg) | ||
|
|
||
|
|
||
| def test_parse_env_cfg_applies_requested_physics_preset() -> None: | ||
| """A requested preset must win over the task's default backend.""" | ||
| env_cfg = parse_env_cfg(_PHYSX_DEFAULT_TASK, presets=("newton_mjwarp",)) | ||
|
|
||
| assert isinstance(env_cfg.sim.physics, NewtonCfg) | ||
|
|
||
|
|
||
| def test_parse_env_cfg_applies_preset_alongside_other_overrides() -> None: | ||
| """Selecting a preset must not discard the device and num_envs overrides.""" | ||
| env_cfg = parse_env_cfg(_PHYSX_DEFAULT_TASK, device="cuda:0", num_envs=3, presets=("newton_mjwarp",)) | ||
|
|
||
| assert isinstance(env_cfg.sim.physics, NewtonCfg) | ||
| assert env_cfg.sim.device == "cuda:0" | ||
| assert env_cfg.scene.num_envs == 3 |
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🟡 Warning · Api — Public API change filed as skip fragment
The fragment uses the
.skiptier, which the repository rules reserve for CI/docs/test-only changes and which yields no changelog entry and no version bump. This PR also changes public source:parse_env_cfggains apresetsparameter and new preset-resolution behavior. File an.rstfragment forisaaclab_taskswith anAdded/Fixedentry describingparse_env_cfg(..., presets=...). The text also mentions a file split not present in this diff.