Repository navigation
fix(rl): defer off-policy live terminal display until startup completes #1412
Workflow file for this run
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
| name: CI | |
| on: | |
| pull_request: | |
| branches: [main] | |
| types: [opened, synchronize, reopened, ready_for_review] | |
| paths-ignore: | |
| - "LICENSE" | |
| - ".github/CODEOWNERS" | |
| - ".github/ISSUE_TEMPLATE/**" | |
| - ".github/pull_request_template.md" | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event.pull_request.number || github.ref_name }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| env: | |
| UV_FROZEN: "1" | |
| jobs: | |
| ruff-lint: | |
| if: github.event_name == 'workflow_dispatch' || github.event_name == 'pull_request' | |
| timeout-minutes: 5 | |
| runs-on: ubuntu-slim | |
| steps: | |
| - uses: actions/checkout@v6.0.2 | |
| with: | |
| ref: ${{ github.event_name == 'workflow_dispatch' && github.ref || format('refs/pull/{0}/merge', github.event.pull_request.number) }} | |
| persist-credentials: false | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v8.0.0 | |
| with: | |
| enable-cache: true | |
| - name: Install dependencies(only dev group) | |
| run: uv sync --only-group dev | |
| - name: Check | |
| run: uv run --no-sync ruff check --output-format=github . | |
| ruff-format: | |
| if: github.event_name == 'workflow_dispatch' || github.event_name == 'pull_request' | |
| timeout-minutes: 5 | |
| runs-on: ubuntu-slim | |
| steps: | |
| - uses: actions/checkout@v6.0.2 | |
| with: | |
| ref: ${{ github.event_name == 'workflow_dispatch' && github.ref || format('refs/pull/{0}/merge', github.event.pull_request.number) }} | |
| persist-credentials: false | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v8.0.0 | |
| with: | |
| enable-cache: true | |
| - name: Install dependencies(only dev group) | |
| run: uv sync --only-group dev | |
| - name: Check | |
| run: uv run --no-sync ruff format --check . | |
| mypy: | |
| if: github.event_name == 'workflow_dispatch' || github.event_name == 'pull_request' | |
| timeout-minutes: 10 | |
| runs-on: ubuntu-slim | |
| steps: | |
| - uses: actions/checkout@v6.0.2 | |
| with: | |
| ref: ${{ github.event_name == 'workflow_dispatch' && github.ref || format('refs/pull/{0}/merge', github.event.pull_request.number) }} | |
| persist-credentials: false | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v8.0.0 | |
| with: | |
| enable-cache: true | |
| - name: Install dependencies | |
| run: | | |
| uv sync \ | |
| --no-install-package torch \ | |
| --no-install-package nvidia-cublas-cu12 \ | |
| --no-install-package nvidia-cuda-cupti-cu12 \ | |
| --no-install-package nvidia-cuda-nvrtc-cu12 \ | |
| --no-install-package nvidia-cuda-runtime-cu12 \ | |
| --no-install-package nvidia-cudnn-cu12 \ | |
| --no-install-package nvidia-cufft-cu12 \ | |
| --no-install-package nvidia-cufile-cu12 \ | |
| --no-install-package nvidia-curand-cu12 \ | |
| --no-install-package nvidia-cusolver-cu12 \ | |
| --no-install-package nvidia-cusparse-cu12 \ | |
| --no-install-package nvidia-cusparselt-cu12 \ | |
| --no-install-package nvidia-nccl-cu12 \ | |
| --no-install-package nvidia-nvjitlink-cu12 \ | |
| --no-install-package nvidia-nvtx-cu12 \ | |
| --no-install-package triton | |
| uv pip install torch==2.10.0 --index-url https://download.pytorch.org/whl/cpu | |
| - name: Check | |
| run: uv run --no-sync mypy src/unilab | |
| pyright: | |
| if: github.event_name == 'workflow_dispatch' || github.event_name == 'pull_request' | |
| timeout-minutes: 10 | |
| runs-on: ubuntu-slim | |
| steps: | |
| - uses: actions/checkout@v6.0.2 | |
| with: | |
| ref: ${{ github.event_name == 'workflow_dispatch' && github.ref || format('refs/pull/{0}/merge', github.event.pull_request.number) }} | |
| persist-credentials: false | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v8.0.0 | |
| with: | |
| enable-cache: true | |
| - name: Install dependencies | |
| run: | | |
| uv sync \ | |
| --no-install-package torch \ | |
| --no-install-package nvidia-cublas-cu12 \ | |
| --no-install-package nvidia-cuda-cupti-cu12 \ | |
| --no-install-package nvidia-cuda-nvrtc-cu12 \ | |
| --no-install-package nvidia-cuda-runtime-cu12 \ | |
| --no-install-package nvidia-cudnn-cu12 \ | |
| --no-install-package nvidia-cufft-cu12 \ | |
| --no-install-package nvidia-cufile-cu12 \ | |
| --no-install-package nvidia-curand-cu12 \ | |
| --no-install-package nvidia-cusolver-cu12 \ | |
| --no-install-package nvidia-cusparse-cu12 \ | |
| --no-install-package nvidia-cusparselt-cu12 \ | |
| --no-install-package nvidia-nccl-cu12 \ | |
| --no-install-package nvidia-nvjitlink-cu12 \ | |
| --no-install-package nvidia-nvtx-cu12 \ | |
| --no-install-package triton | |
| uv pip install torch==2.10.0 --index-url https://download.pytorch.org/whl/cpu | |
| - name: Check | |
| run: uv run --no-sync pyright | |
| benchmark-smoke: | |
| if: github.event_name == 'workflow_dispatch' || github.event_name == 'pull_request' | |
| timeout-minutes: 10 | |
| runs-on: ubuntu-slim | |
| steps: | |
| - uses: actions/checkout@v6.0.2 | |
| with: | |
| ref: ${{ github.event_name == 'workflow_dispatch' && github.ref || format('refs/pull/{0}/merge', github.event.pull_request.number) }} | |
| persist-credentials: false | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v8.0.0 | |
| with: | |
| enable-cache: true | |
| python-version: '3.11' | |
| - name: Install dependencies | |
| run: | | |
| uv sync --extra mujoco \ | |
| --no-install-package torch \ | |
| --no-install-package nvidia-cublas-cu12 \ | |
| --no-install-package nvidia-cuda-cupti-cu12 \ | |
| --no-install-package nvidia-cuda-nvrtc-cu12 \ | |
| --no-install-package nvidia-cuda-runtime-cu12 \ | |
| --no-install-package nvidia-cudnn-cu12 \ | |
| --no-install-package nvidia-cufft-cu12 \ | |
| --no-install-package nvidia-cufile-cu12 \ | |
| --no-install-package nvidia-curand-cu12 \ | |
| --no-install-package nvidia-cusolver-cu12 \ | |
| --no-install-package nvidia-cusparse-cu12 \ | |
| --no-install-package nvidia-cusparselt-cu12 \ | |
| --no-install-package nvidia-nccl-cu12 \ | |
| --no-install-package nvidia-nvjitlink-cu12 \ | |
| --no-install-package nvidia-nvtx-cu12 \ | |
| --no-install-package triton | |
| uv pip install torch==2.10.0 --index-url https://download.pytorch.org/whl/cpu | |
| - name: Benchmark entrypoint smoke test | |
| run: uv run --no-sync python scripts/benchmark/smoke_test.py | |
| test: | |
| if: github.event_name == 'workflow_dispatch' || github.event_name == 'pull_request' | |
| # Keep the complete not-slow suite on every PR, but split it by owner area | |
| # so one slow area no longer serializes all test feedback. The shards are | |
| # stable directory partitions; do not solve overlap by deselecting tests. | |
| timeout-minutes: 20 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| shard: | |
| - name: core | |
| paths: >- | |
| tests/base | |
| tests/architecture | |
| tests/assets | |
| --ignore | |
| tests/base/test_sim_backend.py | |
| - name: environments | |
| paths: >- | |
| tests/envs | |
| tests/managers | |
| tests/tasks | |
| tests/terrains | |
| - name: applications | |
| paths: >- | |
| tests/algos | |
| tests/benchmark | |
| tests/config | |
| tests/scripts | |
| tests/training | |
| tests/utils | |
| tests/visualization | |
| tests/test_bones_seed_csv.py | |
| tests/test_cli.py | |
| tests/test_cli_runtime_requirements.py | |
| tests/test_completion.py | |
| tests/test_dependency_contracts.py | |
| tests/test_import_robot.py | |
| tests/test_library_import_boundary.py | |
| tests/test_pull_assets.py | |
| tests/test_render_teaser.py | |
| tests/test_unreachable_branch_cleanup.py | |
| - name: rl | |
| paths: tests/rl | |
| name: test-${{ matrix.shard.name }} | |
| runs-on: ubuntu-slim | |
| steps: | |
| - uses: actions/checkout@v6.0.2 | |
| with: | |
| ref: ${{ github.event_name == 'workflow_dispatch' && github.ref || format('refs/pull/{0}/merge', github.event.pull_request.number) }} | |
| persist-credentials: false | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v8.0.0 | |
| with: | |
| enable-cache: true | |
| # python-version: ${{ matrix.python-version }} | |
| python-version: '3.11' | |
| - name: Install system dependencies | |
| run: sudo apt-get update && sudo apt-get install -y libwayland-client0 | |
| - name: Install dependencies | |
| run: | | |
| uv sync --extra mujoco --extra mjwarp \ | |
| --no-install-package torch \ | |
| --no-install-package nvidia-cublas-cu12 \ | |
| --no-install-package nvidia-cuda-cupti-cu12 \ | |
| --no-install-package nvidia-cuda-nvrtc-cu12 \ | |
| --no-install-package nvidia-cuda-runtime-cu12 \ | |
| --no-install-package nvidia-cudnn-cu12 \ | |
| --no-install-package nvidia-cufft-cu12 \ | |
| --no-install-package nvidia-cufile-cu12 \ | |
| --no-install-package nvidia-curand-cu12 \ | |
| --no-install-package nvidia-cusolver-cu12 \ | |
| --no-install-package nvidia-cusparse-cu12 \ | |
| --no-install-package nvidia-cusparselt-cu12 \ | |
| --no-install-package nvidia-nccl-cu12 \ | |
| --no-install-package nvidia-nvjitlink-cu12 \ | |
| --no-install-package nvidia-nvtx-cu12 \ | |
| --no-install-package triton | |
| uv pip install torch==2.10.0 --index-url https://download.pytorch.org/whl/cpu | |
| - name: Cache robot assets | |
| uses: actions/cache@v4.2.3 | |
| with: | |
| path: src/unilab/assets/robots | |
| key: ${{ runner.os }}-robot-assets-v1-${{ hashFiles('src/unilab/assets/hub.py') }} | |
| - name: Keep git-tracked assets at the checked-out commit | |
| # The robots cache persists HF-downloaded meshes across runs, but it | |
| # also snapshots git-tracked scene XMLs and would silently roll them | |
| # back to the cached revision. Restore tracked files from the index; | |
| # untracked downloads stay untouched. | |
| run: git restore --worktree -- src/unilab/assets/robots | |
| - name: Pull robot assets | |
| run: uv run --no-sync unilab-pull-assets --robot all | |
| - name: Test with coverage | |
| env: | |
| COVERAGE_SOURCE: ${{ matrix.shard.name == 'rl' && 'src/unilab/rl' || 'src/unilab' }} | |
| COVERAGE_FAIL_UNDER: ${{ matrix.shard.name == 'rl' && '50' || '0' }} | |
| # Some tests change the process working directory; keep shard data at | |
| # a stable absolute path instead of relying on a relative .coverage. | |
| COVERAGE_FILE: ${{ github.workspace }}/coverage-${{ matrix.shard.name }}.dat | |
| run: >- | |
| uv run --no-sync pytest | |
| ${{ matrix.shard.paths }} | |
| --cov=${COVERAGE_SOURCE} | |
| --cov-report=term-missing | |
| --cov-fail-under=${COVERAGE_FAIL_UNDER} | |
| - name: Upload shard coverage | |
| if: always() | |
| uses: actions/upload-artifact@v4.6.2 | |
| with: | |
| name: coverage-data-${{ matrix.shard.name }} | |
| path: coverage-${{ matrix.shard.name }}.dat | |
| retention-days: 1 | |
| coverage: | |
| needs: test | |
| # Run even when a shard fails so contributors can inspect total coverage, | |
| # while the failed shard remains the merge-blocking result. | |
| if: always() && !cancelled() && (github.event_name == 'workflow_dispatch' || github.event_name == 'pull_request') | |
| timeout-minutes: 5 | |
| runs-on: ubuntu-slim | |
| steps: | |
| - uses: actions/checkout@v6.0.2 | |
| with: | |
| ref: ${{ github.event_name == 'workflow_dispatch' && github.ref || format('refs/pull/{0}/merge', github.event.pull_request.number) }} | |
| persist-credentials: false | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v8.0.0 | |
| with: | |
| enable-cache: true | |
| python-version: '3.11' | |
| - name: Install coverage tools | |
| run: uv sync --only-group dev | |
| - name: Download shard coverage | |
| uses: actions/download-artifact@v4.3.0 | |
| with: | |
| pattern: coverage-data-* | |
| path: coverage-data | |
| - name: Normalize shard coverage names | |
| # download-artifact keeps one directory per artifact, while coverage | |
| # combine expects sibling files named ".coverage.<suffix>". | |
| run: | | |
| for shard_dir in coverage-data/coverage-data-*; do | |
| shard="${shard_dir##*/coverage-data-}" | |
| mv "$shard_dir/coverage-${shard}.dat" "coverage-data/.coverage.${shard}" | |
| done | |
| - name: Combine and enforce repository coverage | |
| # The repository-wide gate is evaluated after all shard data is combined; | |
| # the RL shard independently preserves its 50% gate (issue #2372). | |
| # | |
| # Keep the literal --cov=src/unilab source path: repository-hygiene tests | |
| # reject package-name-only coverage invocations. | |
| run: | | |
| uv run --no-sync coverage combine coverage-data | |
| uv run --no-sync coverage report --format=markdown >> "${GITHUB_STEP_SUMMARY}" | |
| uv run --no-sync coverage report --fail-under=25 |