-
Notifications
You must be signed in to change notification settings - Fork 3.8k
[Test] Cover contributed environments in the shared smoke test #7068
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
Changes from all commits
40e0a77
33e337c
419ba1e
f2d38fb
55a1780
9f3bb5e
fe80add
31c3cc4
da0260e
c1859a8
366ae4c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -14,6 +14,10 @@ | |
|
|
||
| """Rest everything follows.""" | ||
|
|
||
| import subprocess | ||
| import sys | ||
| from pathlib import Path | ||
|
|
||
| import pytest | ||
|
|
||
| import isaaclab_tasks # noqa: F401 | ||
|
|
@@ -22,16 +26,62 @@ | |
| from env_test_utils import _run_environments, setup_environment # isort: skip | ||
|
|
||
|
|
||
| def _ensure_franka_pour_reset_dataset() -> None: | ||
| """Generate the smallest valid reset dataset when the Pour smoke test needs it.""" | ||
| repo_root = Path(__file__).resolve().parents[4] | ||
| dataset_path = repo_root / "datasets/franka_pour/reset_dataset.pt" | ||
| if dataset_path.is_file(): | ||
| return | ||
|
|
||
| subprocess.run( | ||
| [ | ||
| sys.executable, | ||
| str(repo_root / "scripts/tools/generate_franka_pour_reset_dataset.py"), | ||
| "--device", | ||
| "cuda:0", | ||
| "--grasping_count", | ||
| "100", | ||
| "--non_grasping_count", | ||
| "6", | ||
| "--batch_size", | ||
| "128", | ||
| ], | ||
| cwd=repo_root, | ||
| check=True, | ||
| ) | ||
|
|
||
|
|
||
| @pytest.mark.parametrize("physics_preset_name", ["newton_mjwarp", "physx", "isaacsim_physx"]) | ||
| @pytest.mark.parametrize("num_envs, device", [(2, "cuda"), (1, "cuda")]) | ||
| @pytest.mark.parametrize( | ||
| "task_name", | ||
| setup_environment( | ||
| include_play=False, | ||
| multi_agent=False, | ||
| tier="core", | ||
| ), | ||
| ) | ||
| @pytest.mark.isaacsim_ci | ||
| def test_environments(task_name, num_envs, device): | ||
| def test_environments(task_name, physics_preset_name, num_envs, device): | ||
| # run environments without stage in memory | ||
| _run_environments( | ||
| task_name, device, num_envs, create_stage_in_memory=False, physics_preset_name=physics_preset_name | ||
| ) | ||
|
|
||
|
|
||
| @pytest.mark.parametrize("num_envs, device", [(2, "cuda")]) | ||
| @pytest.mark.parametrize( | ||
| "task_name", | ||
| setup_environment( | ||
| multi_agent=False, | ||
| factory_envs=False, | ||
| cartpole_showcase_envs=False, | ||
| pickplace_stack_envs=False, | ||
| teleop_envs=False, | ||
| tier="contrib", | ||
| ), | ||
| ) | ||
| @pytest.mark.isaacsim_ci | ||
| def test_contrib_environments(task_name, num_envs, device): | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟡 Warning · Implementation — Contrib move drops Franka-Pour artifact skip The deleted |
||
| if task_name == "IsaacContrib-Franka-Pour": | ||
| _ensure_franka_pour_reset_dataset() | ||
| _run_environments(task_name, device, num_envs, create_stage_in_memory=False) | ||
This file was deleted.
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.
When pytest imports this module, the empty
test_contrib_environmentsdefinition raises anIndentationError, preventing collection of both the core backend matrix and the contributed smoke test.