Repository navigation
Preserve static navigation patch proof and resealed asset previews #83
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: Tests | |
| on: | |
| push: | |
| pull_request: | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: tests-${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| OPENBLAS_NUM_THREADS: "1" | |
| OMP_NUM_THREADS: "1" | |
| PYTHONUNBUFFERED: "1" | |
| jobs: | |
| visual: | |
| name: Visual / ${{ matrix.os }} / Python ${{ matrix.python }} | |
| runs-on: ${{ matrix.os }} | |
| timeout-minutes: 15 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| python: ["3.12", "3.13"] | |
| steps: | |
| - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0 | |
| with: | |
| persist-credentials: false | |
| - uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0 | |
| with: | |
| python-version: ${{ matrix.python }} | |
| - name: Install FFmpeg on Linux | |
| if: runner.os == 'Linux' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y ffmpeg | |
| - name: Install FFmpeg on macOS | |
| if: runner.os == 'macOS' | |
| run: brew install ffmpeg | |
| - name: Install FFmpeg on Windows | |
| if: runner.os == 'Windows' | |
| shell: pwsh | |
| run: | | |
| choco install ffmpeg --yes --no-progress | |
| if ($LASTEXITCODE -ne 0) { throw "FFmpeg installation failed." } | |
| "C:\ProgramData\chocolatey\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append | |
| - name: Install visual base | |
| run: python -m pip install . | |
| - name: Verify tools and installed entry points | |
| run: | | |
| python -m pip check | |
| ffmpeg -version | |
| ffprobe -version | |
| dvidia-train --help | |
| dvidia-training-studio --help | |
| dvidia-training-benchmark --help | |
| dvidia-skillspace-coverage --help | |
| dvidia-episode-tape --help | |
| dvidia-reaction --help | |
| dvidia-motor-memory --help | |
| dvidia-observe --help | |
| dvidia-observation-studio --help | |
| dvidia-motion --help | |
| dvidia-transition --help | |
| dvidia-embodiment --help | |
| dvidia-reference-task --help | |
| dvidia-robot-sim --help | |
| dvidia-robot-sim list | |
| dvidia-assets --help | |
| dvidia-assets list | |
| dvidia-piper-grip --help | |
| dvidia-piper-contact --help | |
| dvidia-piper-recovery --help | |
| dvidia-piper-reliability --help | |
| dvidia-training-doctor --json | |
| - name: Test footage, visual training and loopback studio | |
| run: python -m unittest tests.test_footage_data tests.test_footage_train tests.test_footage_pipeline tests.test_footage_benchmark tests.test_training_studio tests.test_doctor tests.test_coverage tests.test_episode_tape tests.test_reaction tests.test_reaction_metrics tests.test_reaction_convergence tests.test_reaction_benchmark tests.test_motor_memory tests.test_motor_metrics tests.test_motor_benchmark tests.test_observations tests.test_observation_models tests.test_motion tests.test_motion_benchmark tests.test_transition_model tests.test_transition_pilot tests.test_transition_cli tests.test_embodiment_calibration tests.test_embodiment_cli tests.test_reference_sim -v | |
| reference: | |
| name: Hardware reference / Linux / Python 3.12 | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| steps: | |
| - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0 | |
| with: | |
| persist-credentials: false | |
| - uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0 | |
| with: | |
| python-version: "3.12" | |
| - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 | |
| with: | |
| node-version: "22" | |
| - name: Verify reproducible local viewer bundle | |
| run: | | |
| npm ci --ignore-scripts --prefix viewer | |
| npm run --prefix viewer build | |
| npm run --prefix viewer build:assets | |
| node tests/browser/reference_replay_loader.cjs | |
| git diff --exit-code -- src/dvidia_training/reference_replay.bundle.js src/dvidia_training/reference_replay.third-party.txt src/dvidia_training/asset_library.bundle.js | |
| - name: Provision pinned reference models | |
| run: | | |
| python -m pip install ".[arm]" | |
| dvidia-embodiment fetch-assets --output runs/reference-assets-ci --hands | |
| dvidia-embodiment verify-assets runs/reference-assets-ci --hands | |
| - name: Test compiled mechanics, collisions and replay scoring | |
| env: | |
| DVIDIA_REFERENCE_ASSETS: runs/reference-assets-ci | |
| run: python -m unittest tests.test_reference_sim tests.test_reference_replay tests.test_embodiment_cli tests.test_embodiment_calibration tests.test_reference_task tests.test_reference_task_benchmark tests.test_reference_task_replay -v | |
| - name: Retain all numerical reference attempts | |
| run: | | |
| dvidia-embodiment benchmark runs/reference-assets-ci --hands --output runs/reference-bench-ci --repeats 1 --seconds 2 | |
| dvidia-embodiment inspect runs/reference-bench-ci | |
| - name: Export native mesh and recorded 3D poses | |
| run: dvidia-embodiment export-replay runs/reference-assets-ci runs/reference-bench-ci --output runs/reference-replay-ci | |
| - name: Retain native task and matched control attempts | |
| run: | | |
| dvidia-reference-task benchmark runs/reference-assets-ci --output runs/reference-task-ci --nominal 1 --stress 0 | |
| dvidia-reference-task inspect runs/reference-task-ci | |
| dvidia-reference-task export-replay runs/reference-assets-ci runs/reference-task-ci --output runs/reference-task-replay-ci | |
| - name: Preserve reference evidence | |
| if: always() | |
| uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 | |
| with: | |
| name: hardware-reference-bench | |
| path: | | |
| runs/reference-bench-ci | |
| runs/reference-replay-ci | |
| runs/reference-task-ci | |
| runs/reference-task-replay-ci | |
| if-no-files-found: ignore | |
| - name: Verify additional CPU arm profiles | |
| run: | | |
| dvidia-robot-sim fetch piper --output runs/robot-profile-assets-ci | |
| dvidia-robot-sim fetch so101 --output runs/robot-profile-assets-ci | |
| dvidia-robot-sim audit piper runs/robot-profile-assets-ci | |
| dvidia-robot-sim audit so101 runs/robot-profile-assets-ci | |
| dvidia-robot-sim benchmark piper runs/robot-profile-assets-ci --output runs/piper-smoke-ci | |
| dvidia-robot-sim benchmark so101 runs/robot-profile-assets-ci --output runs/so101-smoke-ci | |
| - name: Test profile contracts against pinned native assets | |
| env: | |
| DVIDIA_ROBOT_PROFILE_ASSETS: runs/robot-profile-assets-ci | |
| run: python -m unittest tests.test_robot_profiles tests.test_piper_task tests.test_piper_task_benchmark tests.test_piper_grip_guard tests.test_piper_grip_benchmark tests.test_piper_contact_memory tests.test_piper_contact_benchmark tests.test_piper_contact_recovery tests.test_piper_recovery_benchmark -v | |
| - name: Test reusable shoe assets and scene previews | |
| env: | |
| DVIDIA_ASSET_PREVIEW_TEST_ASSETS: runs/robot-profile-assets-ci | |
| DVIDIA_ASSET_UR5E_ROOT: runs/reference-assets-ci | |
| DVIDIA_ASSET_LIBRARY_ROOTS: '{"ur5e":"runs/reference-assets-ci","piper":"runs/robot-profile-assets-ci","so101":"runs/robot-profile-assets-ci"}' | |
| DVIDIA_REFERENCE_ASSETS: runs/reference-assets-ci | |
| DVIDIA_ROBOT_PROFILE_ASSETS: runs/robot-profile-assets-ci | |
| run: python -m unittest tests.test_asset_library tests.test_asset_benchmark tests.test_asset_preview -v | |
| - name: Retain PiPER contact task and matched controls | |
| run: | | |
| dvidia-piper-task benchmark runs/robot-profile-assets-ci --output runs/piper-task-ci --nominal 1 --stress 0 | |
| dvidia-piper-task inspect runs/piper-task-ci | |
| - name: Retain paired grip validation and recovery evidence | |
| run: | | |
| dvidia-piper-grip benchmark --assets runs/robot-profile-assets-ci --output runs/piper-grip-ci | |
| dvidia-piper-grip inspect runs/piper-grip-ci | |
| - name: Test bounded static simulation publication without credentials | |
| run: | | |
| python -m pip install -r publishing/huggingface/requirements.txt | |
| python -m unittest discover -s publishing/huggingface -p 'test_publish_robot_sim.py' -v | |
| python -m unittest discover -s publishing/huggingface -p 'test_prepare_asset_library.py' -v | |
| python -m unittest discover -s publishing/huggingface/robot-simulation-lab -p 'test_*.py' -v | |
| - name: Preserve additional profile evidence | |
| if: always() | |
| uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 | |
| with: | |
| name: additional-robot-profiles | |
| path: | | |
| runs/piper-task-ci | |
| runs/piper-grip-ci | |
| runs/piper-smoke-ci | |
| runs/so101-smoke-ci | |
| if-no-files-found: ignore | |
| piper-comparisons: | |
| name: PiPER ${{ matrix.cli }} / Linux / Python 3.12 | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 25 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - cli: contact | |
| inspection: "" | |
| - cli: recovery | |
| inspection: "" | |
| - cli: reliability | |
| inspection: "--assets runs/piper-assets-ci" | |
| steps: | |
| - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0 | |
| with: | |
| persist-credentials: false | |
| - uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0 | |
| with: | |
| python-version: "3.12" | |
| - name: Provision unchanged native PiPER assets | |
| run: | | |
| python -m pip install ".[arm]" | |
| dvidia-robot-sim fetch piper --output runs/piper-assets-ci | |
| dvidia-robot-sim audit piper runs/piper-assets-ci | |
| - name: Test new reliability decisions and receipt integrity | |
| if: matrix.cli == 'reliability' | |
| env: | |
| DVIDIA_ROBOT_PROFILE_ASSETS: runs/piper-assets-ci | |
| run: python -m unittest tests.test_piper_reacquisition tests.test_piper_grasp_strategy tests.test_piper_reliability_benchmark -v | |
| - name: Run every planned placement and matched negative control | |
| run: | | |
| dvidia-piper-${{ matrix.cli }} benchmark --assets runs/piper-assets-ci --output runs/piper-comparison-ci | |
| dvidia-piper-${{ matrix.cli }} inspect runs/piper-comparison-ci ${{ matrix.inspection }} | |
| - name: Preserve complete comparison including failed attempts | |
| if: always() | |
| uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 | |
| with: | |
| name: piper-${{ matrix.cli }}-comparison | |
| path: runs/piper-comparison-ci | |
| if-no-files-found: ignore | |
| motion: | |
| name: Causal image motion / Linux / Python 3.12 | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| steps: | |
| - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0 | |
| with: | |
| persist-credentials: false | |
| - uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0 | |
| with: | |
| python-version: "3.12" | |
| - name: Install CPU optical-flow runtime | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y ffmpeg | |
| python -m pip install ".[observations]" | |
| python -m pip check | |
| dvidia-motion --help | |
| - name: Verify source clocks, causal rows, scoring and local replay | |
| run: python -m unittest tests.test_motion tests.test_motion_video tests.test_motion_benchmark tests.test_motion_studio -v | |
| - name: Run and inspect authored tracking and prediction fixtures | |
| run: | | |
| dvidia-motion benchmark --output runs/image-motion-ci | |
| dvidia-motion inspect runs/image-motion-ci | |
| - name: Preserve every attempted synthetic motion case | |
| if: always() | |
| uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 | |
| with: | |
| name: authored-image-motion | |
| path: runs/image-motion-ci | |
| if-no-files-found: ignore | |
| observations: | |
| name: Observation detectors / Linux / Python 3.12 | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| steps: | |
| - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0 | |
| with: | |
| persist-credentials: false | |
| - uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0 | |
| with: | |
| python-version: "3.12" | |
| - name: Install observation runtime | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y ffmpeg | |
| python -m pip install ".[observations]" | |
| python -m pip check | |
| - name: Verify review contracts and explicitly provision pinned detectors | |
| run: | | |
| python -m unittest tests.test_observations tests.test_observation_models -v | |
| python -m unittest discover -s publishing/huggingface -p 'test_publish_observation.py' -v | |
| python -m unittest discover -s publishing/huggingface/observation-lab -p 'test_*.py' -v | |
| node publishing/huggingface/observation-lab/test_adapter.cjs | |
| python scripts/download_observation_models.py --download --output runs/observation-models-ci | |
| - name: Smoke test actual ONNX loading and inference | |
| run: | | |
| python - <<'PY' | |
| import json, tempfile | |
| from pathlib import Path | |
| import cv2, numpy as np | |
| from dvidia_training.observation_models import OpenCVDetector | |
| detector = OpenCVDetector('runs/observation-models-ci') | |
| with tempfile.TemporaryDirectory() as directory: | |
| frame = Path(directory) / 'neutral.png' | |
| assert cv2.imwrite(str(frame), np.full((240, 320, 3), 240, np.uint8)) | |
| rows = detector.detect(frame) | |
| assert isinstance(rows, list) | |
| print(json.dumps({'scope': 'neutral-image model-loading smoke test; no accuracy measurement', | |
| 'proposals': len(rows), 'runtime': detector.metadata})) | |
| PY | |
| arm: | |
| name: Optional arm / Linux / Python 3.12 | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 20 | |
| steps: | |
| - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0 | |
| with: | |
| persist-credentials: false | |
| - uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0 | |
| with: | |
| python-version: "3.12" | |
| - name: Install FFmpeg and arm extra | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y ffmpeg | |
| python -m pip install ".[arm]" | |
| python -m pip check | |
| - name: Test native arm and candidate capsule | |
| run: python -m unittest discover -s tests -v | |
| - name: Train and qualify the synthetic native pilot | |
| run: python benchmarks/native_pilot.py --output runs/native-pilot | |
| - name: Run and verify reaction mechanical coupons | |
| run: | | |
| dvidia-reaction benchmark --output runs/reaction-ci --repeats 1 --convergence | |
| dvidia-reaction inspect runs/reaction-ci | |
| - name: Preserve reaction diagnostic evidence | |
| if: always() | |
| uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 | |
| with: | |
| name: reaction-mechanical-coupons | |
| path: runs/reaction-ci | |
| if-no-files-found: ignore | |
| - name: Fit and verify motor memory and matched approach tasks | |
| run: | | |
| dvidia-motor-memory train --output runs/motor-memory-ci | |
| dvidia-motor-memory inspect runs/motor-memory-ci | |
| dvidia-motor-memory benchmark --memory runs/motor-memory-ci --output runs/motor-benchmark-ci --repeats 1 | |
| dvidia-motor-memory inspect runs/motor-benchmark-ci | |
| - name: Preserve motor memory and task evidence | |
| if: always() | |
| uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 | |
| with: | |
| name: motor-memory-approach-tasks | |
| path: | | |
| runs/motor-memory-ci | |
| runs/motor-benchmark-ci | |
| if-no-files-found: ignore | |
| container: | |
| name: Visual CLI container | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| steps: | |
| - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0 | |
| with: | |
| persist-credentials: false | |
| - name: Build CPU image | |
| run: docker build -t dvidia-training:ci . | |
| - name: Check CLI with networking disabled | |
| run: docker run --rm --network none dvidia-training:ci --help | |
| - name: Train and verify with networking disabled | |
| run: >- | |
| docker run --rm --network none --entrypoint sh dvidia-training:ci -c | |
| 'dvidia-train example --clips 5 --output /workspace/source && | |
| dvidia-train run /workspace/source --output /workspace/trained && | |
| dvidia-train inspect /workspace/trained' |