From 08d5aa77d9c40aa6e4938369b65d9da14d42c255 Mon Sep 17 00:00:00 2001 From: Shuheng Liu Date: Fri, 22 May 2026 11:53:49 -0700 Subject: [PATCH] ci(gpu): point LIBERO at bundled package assets in nightly test test_control_freq_reaches_real_robosuite_sim builds a real OffScreenRenderEnv, which needs LIBERO's bddl/init/asset files. The workflow set LIBERO_CONFIG_PATH to an empty /tmp tree (correct for the mocked CPU tests, which patch get_libero_path), so the test failed with FileNotFoundError on a .pruned_init file. Generate the config from the assets bundled in the installed package (the fork's MANIFEST grafts bddl_files/init_files/assets) via set_libero_default_path(). Also set init_states=False in the test to focus it on the control_freq assertion; the env build still exercises the real bddl/asset path, so init_states alone would not have fixed it. --- .github/workflows/gpu_test.yml | 12 ++++++++++-- tests/envs/test_libero_control_freq.py | 1 + 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/workflows/gpu_test.yml b/.github/workflows/gpu_test.yml index 453db4b5..94b9d022 100644 --- a/.github/workflows/gpu_test.yml +++ b/.github/workflows/gpu_test.yml @@ -89,8 +89,16 @@ jobs: shell: bash run: | source .venv/bin/activate - mkdir -p /tmp/libero-assets/libero/libero - export LIBERO_CONFIG_PATH="$(pwd)/.github/assets/libero" + # Point LIBERO at the assets bundled inside the installed package (the + # fork's MANIFEST grafts bddl_files/init_files/assets) so the real-sim + # GPU test can build a genuine OffScreenRenderEnv. The .github/assets/libero + # config used by the mocked CPU tests points every path at an empty /tmp + # tree, which is fine for mocks but not for a real env build (it reads the + # bddl file via get_libero_path("bddl_files")). + export LIBERO_CONFIG_PATH=/tmp/libero-cfg + mkdir -p "$LIBERO_CONFIG_PATH" + touch "$LIBERO_CONFIG_PATH/config.yaml" # pre-create so the LIBERO import skips its first-run input() prompt + python -c "from libero.libero import set_libero_default_path; set_libero_default_path()" pytest -m "gpu" -n 0 -v tests/ stop-runner: diff --git a/tests/envs/test_libero_control_freq.py b/tests/envs/test_libero_control_freq.py index a0c5c5b1..30e3e2d1 100644 --- a/tests/envs/test_libero_control_freq.py +++ b/tests/envs/test_libero_control_freq.py @@ -105,6 +105,7 @@ def test_control_freq_reaches_real_robosuite_sim(): n_envs=1, gym_kwargs={"task_ids": {"libero_10": [0]}, "control_freq": 13}, env_cls=gym.vector.SyncVectorEnv, + init_states=False, ) vec = envs["libero_10"][0] try: