Commit 01732521 authored by Kelly Guo's avatar Kelly Guo Committed by Kelly Guo

Fixes tests on CI (#399)

- Adds omni.usd.metrics.assembler.ui as dependency for stage unit
conversion
- Increases timeout for tests
- Adds check for correct torch version before uninstalling/installing

<!-- As you go through the list, delete the ones that are not
applicable. -->

- Bug fix (non-breaking change which fixes an issue)

- [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with
`./isaaclab.sh --format`
- [x] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [ ] I have updated the changelog and the corresponding version in the
extension's `config/extension.toml` file
- [ ] I have added my name to the `CONTRIBUTORS.md` or my name already
exists there

<!--
As you go through the checklist above, you can mark something as done by
putting an x character in it

For example,
- [x] I have done this task
- [ ] I have not done this task
-->
parent 3f1be462
...@@ -30,6 +30,7 @@ app.version = "5.0.0" ...@@ -30,6 +30,7 @@ app.version = "5.0.0"
"omni.kit.loop" = {} "omni.kit.loop" = {}
# this is needed to create physics material through CreatePreviewSurfaceMaterialPrim # this is needed to create physics material through CreatePreviewSurfaceMaterialPrim
"omni.kit.usd.mdl" = {} "omni.kit.usd.mdl" = {}
"omni.usd.metrics.assembler.ui" = {}
[settings] [settings]
app.content.emptyStageOnStart = false app.content.emptyStageOnStart = false
......
...@@ -270,9 +270,26 @@ if "%arg%"=="-i" ( ...@@ -270,9 +270,26 @@ if "%arg%"=="-i" (
rem install the python packages in isaaclab/source directory rem install the python packages in isaaclab/source directory
echo [INFO] Installing extensions inside the Isaac Lab repository... echo [INFO] Installing extensions inside the Isaac Lab repository...
call :extract_python_exe call :extract_python_exe
rem first install pytorch with cuda 12.8 for blackwell support rem check if pytorch is installed and its version
call !python_exe! -m pip uninstall -y torch torchvision torchaudio rem install pytorch with cuda 12.8 for blackwell support
call !python_exe! -m pip install torch==2.7.0 torchvision==0.22.0 --index-url https://download.pytorch.org/whl/cu128 call !python_exe! -m pip list | findstr /C:"torch" >nul
if %errorlevel% equ 0 (
for /f "tokens=2" %%i in ('!python_exe! -m pip show torch ^| findstr /C:"Version:"') do (
set torch_version=%%i
)
if not "!torch_version!"=="2.7.0+cu128" (
echo [INFO] Uninstalling PyTorch version !torch_version!...
call !python_exe! -m pip uninstall -y torch torchvision torchaudio
echo [INFO] Installing PyTorch 2.7.0 with CUDA 12.8 support...
call !python_exe! -m pip install torch==2.7.0 torchvision==0.22.0 --index-url https://download.pytorch.org/whl/cu128
) else (
echo [INFO] PyTorch 2.7.0 is already installed.
)
) else (
echo [INFO] Installing PyTorch 2.7.0 with CUDA 12.8 support...
call !python_exe! -m pip install torch==2.7.0 torchvision==0.22.0 --index-url https://download.pytorch.org/whl/cu128
)
for /d %%d in ("%ISAACLAB_PATH%\source\*") do ( for /d %%d in ("%ISAACLAB_PATH%\source\*") do (
set ext_folder="%%d" set ext_folder="%%d"
call :install_isaaclab_extension call :install_isaaclab_extension
...@@ -298,9 +315,27 @@ if "%arg%"=="-i" ( ...@@ -298,9 +315,27 @@ if "%arg%"=="-i" (
rem install the python packages in source directory rem install the python packages in source directory
echo [INFO] Installing extensions inside the Isaac Lab repository... echo [INFO] Installing extensions inside the Isaac Lab repository...
call :extract_python_exe call :extract_python_exe
rem first install pytorch with cuda 12.8 for blackwell support
call !python_exe! -m pip uninstall -y torch torchvision torchaudio rem check if pytorch is installed and its version
call !python_exe! -m pip install torch==2.7.0 torchvision==0.22.0 --index-url https://download.pytorch.org/whl/cu128 rem install pytorch with cuda 12.8 for blackwell support
call !python_exe! -m pip list | findstr /C:"torch" >nul
if %errorlevel% equ 0 (
for /f "tokens=2" %%i in ('!python_exe! -m pip show torch ^| findstr /C:"Version:"') do (
set torch_version=%%i
)
if not "!torch_version!"=="2.7.0+cu128" (
echo [INFO] Uninstalling PyTorch version !torch_version!...
call !python_exe! -m pip uninstall -y torch torchvision torchaudio
echo [INFO] Installing PyTorch 2.7.0 with CUDA 12.8 support...
call !python_exe! -m pip install torch==2.7.0 torchvision==0.22.0 --index-url https://download.pytorch.org/whl/cu128
) else (
echo [INFO] PyTorch 2.7.0 is already installed.
)
) else (
echo [INFO] Installing PyTorch 2.7.0 with CUDA 12.8 support...
call !python_exe! -m pip install torch==2.7.0 torchvision==0.22.0 --index-url https://download.pytorch.org/whl/cu128
)
for /d %%d in ("%ISAACLAB_PATH%\source\*") do ( for /d %%d in ("%ISAACLAB_PATH%\source\*") do (
set ext_folder="%%d" set ext_folder="%%d"
call :install_isaaclab_extension call :install_isaaclab_extension
......
...@@ -276,9 +276,23 @@ while [[ $# -gt 0 ]]; do ...@@ -276,9 +276,23 @@ while [[ $# -gt 0 ]]; do
# install the python packages in IsaacLab/source directory # install the python packages in IsaacLab/source directory
echo "[INFO] Installing extensions inside the Isaac Lab repository..." echo "[INFO] Installing extensions inside the Isaac Lab repository..."
python_exe=$(extract_python_exe) python_exe=$(extract_python_exe)
# first install pytorch with cuda 12.8 for blackwell support # check if pytorch is installed and its version
${python_exe} -m pip uninstall -y torch torchvision torchaudio # install pytorch with cuda 12.8 for blackwell support
${python_exe} -m pip install torch==2.7.0 torchvision==0.22.0 --index-url https://download.pytorch.org/whl/cu128 if ${python_exe} -m pip list 2>/dev/null | grep -q "torch"; then
torch_version=$(${python_exe} -m pip show torch 2>/dev/null | grep "Version:" | awk '{print $2}')
echo "[INFO] Found PyTorch version ${torch_version} installed."
if [[ "${torch_version}" != "2.7.0+cu128" ]]; then
echo "[INFO] Uninstalling PyTorch version ${torch_version}..."
${python_exe} -m pip uninstall -y torch torchvision torchaudio
echo "[INFO] Installing PyTorch 2.7.0 with CUDA 12.8 support..."
${python_exe} -m pip install torch==2.7.0 torchvision==0.22.0 --index-url https://download.pytorch.org/whl/cu128
else
echo "[INFO] PyTorch 2.7.0 is already installed."
fi
else
echo "[INFO] Installing PyTorch 2.7.0 with CUDA 12.8 support..."
${python_exe} -m pip install torch==2.7.0 torchvision==0.22.0 --index-url https://download.pytorch.org/whl/cu128
fi
# recursively look into directories and install them # recursively look into directories and install them
# this does not check dependencies between extensions # this does not check dependencies between extensions
export -f extract_python_exe export -f extract_python_exe
......
...@@ -650,6 +650,7 @@ class AppLauncher: ...@@ -650,6 +650,7 @@ class AppLauncher:
self.global_rank = int(os.getenv("RANK", "0")) + int(os.getenv("JAX_RANK", "0")) self.global_rank = int(os.getenv("RANK", "0")) + int(os.getenv("JAX_RANK", "0"))
self.device_id = self.local_rank self.device_id = self.local_rank
device = "cuda:" + str(self.device_id)
launcher_args["multi_gpu"] = False launcher_args["multi_gpu"] = False
# limit CPU threads to minimize thread context switching # limit CPU threads to minimize thread context switching
# this ensures processes do not take up all available threads and fight for resources # this ensures processes do not take up all available threads and fight for resources
......
...@@ -98,7 +98,7 @@ def test_render_cfg_presets(): ...@@ -98,7 +98,7 @@ def test_render_cfg_presets():
# user-friendly setting overrides # user-friendly setting overrides
dlss_mode = ("/rtx/post/dlss/execMode", 5) dlss_mode = ("/rtx/post/dlss/execMode", 5)
rendering_modes = ["performance", "balanced", "quality", "xr"] rendering_modes = ["performance", "balanced", "quality"]
for rendering_mode in rendering_modes: for rendering_mode in rendering_modes:
# grab groundtruth preset settings # grab groundtruth preset settings
......
...@@ -343,7 +343,9 @@ def warm_start_app(): ...@@ -343,7 +343,9 @@ def warm_start_app():
capture_output=True, capture_output=True,
) )
if len(warm_start_output.stderr) > 0: if len(warm_start_output.stderr) > 0:
if "omni::fabric::IStageReaderWriter" not in str(warm_start_output.stderr): if "omni::fabric::IStageReaderWriter" not in str(warm_start_output.stderr) and "scaling_governor" not in str(
warm_start_output.stderr
):
logging.error(f"Error warm starting the app: {str(warm_start_output.stderr)}") logging.error(f"Error warm starting the app: {str(warm_start_output.stderr)}")
exit(1) exit(1)
...@@ -360,7 +362,9 @@ def warm_start_app(): ...@@ -360,7 +362,9 @@ def warm_start_app():
capture_output=True, capture_output=True,
) )
if len(warm_start_rendering_output.stderr) > 0: if len(warm_start_rendering_output.stderr) > 0:
if "omni::fabric::IStageReaderWriter" not in str(warm_start_rendering_output.stderr): if "omni::fabric::IStageReaderWriter" not in str(
warm_start_rendering_output.stderr
) and "scaling_governor" not in str(warm_start_output.stderr):
logging.error(f"Error warm starting the app with rendering: {str(warm_start_rendering_output.stderr)}") logging.error(f"Error warm starting the app with rendering: {str(warm_start_rendering_output.stderr)}")
exit(1) exit(1)
......
...@@ -12,12 +12,12 @@ import os ...@@ -12,12 +12,12 @@ import os
ISAACLAB_PATH = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) ISAACLAB_PATH = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
"""Path to the root directory of the Isaac Lab repository.""" """Path to the root directory of the Isaac Lab repository."""
DEFAULT_TIMEOUT = 120 DEFAULT_TIMEOUT = 200
"""The default timeout for each test in seconds.""" """The default timeout for each test in seconds."""
PER_TEST_TIMEOUTS = { PER_TEST_TIMEOUTS = {
"test_articulation.py": 200, "test_articulation.py": 300,
"test_rigid_object.py": 200, "test_rigid_object.py": 300,
"test_rigid_object_collection.py": 200, "test_rigid_object_collection.py": 200,
"test_deformable_object.py": 200, "test_deformable_object.py": 200,
"test_rigid_object_collection.py": 200, "test_rigid_object_collection.py": 200,
...@@ -28,7 +28,7 @@ PER_TEST_TIMEOUTS = { ...@@ -28,7 +28,7 @@ PER_TEST_TIMEOUTS = {
"test_camera.py": 500, "test_camera.py": 500,
"test_tiled_camera.py": 500, "test_tiled_camera.py": 500,
"test_multi_tiled_camera.py": 500, "test_multi_tiled_camera.py": 500,
"test_generate_dataset.py": 300, # This test runs annotation for 10 demos and generation until one succeeds "test_generate_dataset.py": 500, # This test runs annotation for 10 demos and generation until one succeeds
"test_rsl_rl_wrapper.py": 200, "test_rsl_rl_wrapper.py": 200,
"test_sb3_wrapper.py": 200, "test_sb3_wrapper.py": 200,
"test_skrl_wrapper.py": 200, "test_skrl_wrapper.py": 200,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment