clean up + formatting + try to reduce latency #317
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: OmniDreams WorldLens Canary | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - "pull-request/[0-9]+" | |
| paths: | |
| - ".github/workflows/omnidreams-worldlens-canary.yml" | |
| - "pyproject.toml" | |
| - "uv.lock" | |
| - "flashdreams/pyproject.toml" | |
| - "integrations_v2/omnidreams/**" | |
| - "flashdreams/flashdreams/core/**" | |
| - "flashdreams/flashdreams/infra/**" | |
| - "flashdreams/flashdreams/recipes/taehv/**" | |
| - "flashdreams/flashdreams/recipes/wan/**" | |
| merge_group: | |
| branches: [main] | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| jobs: | |
| canary: | |
| name: canary3 WorldLens baseline | |
| runs-on: linux-amd64-gpu-rtxpro6000-latest-2 | |
| timeout-minutes: 120 | |
| continue-on-error: true | |
| defaults: | |
| run: | |
| shell: bash | |
| container: | |
| image: nvidia/cuda:13.2.1-cudnn-devel-ubuntu24.04 | |
| options: --gpus all | |
| env: | |
| UV_PROJECT_ENVIRONMENT: /tmp/flashdreams-venv | |
| UV_LINK_MODE: copy | |
| # imgui-bundle has Linux ARM64 wheels for Python 3.11+, but not 3.10. | |
| UV_PYTHON: "3.11" | |
| UV_NO_BUILD_PACKAGE: imgui-bundle | |
| MAX_JOBS: 8 | |
| RUN_ROOT: artifacts/omnidreams_worldlens_canary/run | |
| SCRATCH_ROOT: /tmp/omnidreams-worldlens-scratch | |
| SPLIT: od_26_01_canary3_tb4 | |
| TOTAL_BLOCKS: "4" | |
| BASELINE: integrations_v2/omnidreams/impl/eval_baselines/od-26.01-canary3-tb4-v1.json | |
| CANARY_UUID_REGEX: '"uuid": "(01d503d4-449b-46fc-8d78-9085e70d3554|02e075b9-fd24-426b-971b-7cfcb2074cc9|0499fb41-122d-4180-83af-f954a9974d3b)"' | |
| steps: | |
| - name: Detect GPU architecture | |
| id: gpu-arch | |
| run: | | |
| nvidia-smi | |
| compute_cap=$(nvidia-smi --query-gpu=compute_cap --format=csv,noheader 2>/dev/null | head -1 | tr -d '[:space:]') | |
| arch=$(echo "${compute_cap}" | tr -d '.') | |
| echo "arch=${arch}" >> "$GITHUB_OUTPUT" | |
| echo "Detected GPU compute capability: ${compute_cap} -> sm_${arch}" | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Install system dependencies | |
| run: | | |
| apt-get update -qq | |
| DEBIAN_FRONTEND=noninteractive apt-get install -y -qq --no-install-recommends \ | |
| python3 python3-dev python3-venv \ | |
| ffmpeg \ | |
| gcc g++ ninja-build \ | |
| libgl1-mesa-dev \ | |
| libx11-dev libxcursor-dev libxext-dev libxi-dev libxinerama-dev libxrandr-dev \ | |
| libnccl-dev \ | |
| curl wget git ca-certificates unzip | |
| rm -rf /var/lib/apt/lists/* | |
| - name: Setup proxy cache | |
| uses: nv-gha-runners/setup-proxy-cache@main | |
| - name: Setup uv | |
| uses: astral-sh/setup-uv@v6 | |
| with: | |
| enable-cache: true | |
| cache-suffix: "omnidreams-worldlens-canary-sm${{ steps.gpu-arch.outputs.arch }}" | |
| prune-cache: false | |
| - name: Install dependencies | |
| env: | |
| NVTE_CUDA_ARCHS: ${{ steps.gpu-arch.outputs.arch }} | |
| run: | | |
| uv venv --clear | |
| uv sync --locked --extra dev | |
| - name: Run OmniDreams WorldLens canary | |
| env: | |
| HF_TOKEN: ${{ secrets.HF_TOKEN }} | |
| run: | | |
| set -euo pipefail | |
| mkdir -p "${RUN_ROOT}" "${SCRATCH_ROOT}" | |
| oe() { | |
| uv run --no-sync --package flashdreams-omnidreams omnidreams-eval "$@" | |
| } | |
| oe discover \ | |
| --output "${RUN_ROOT}/manifest-full.jsonl" | |
| { | |
| head -n 1 "${RUN_ROOT}/manifest-full.jsonl" | |
| grep -E "${CANARY_UUID_REGEX}" "${RUN_ROOT}/manifest-full.jsonl" || true | |
| } > "${RUN_ROOT}/manifest.jsonl" | |
| line_count=$(wc -l < "${RUN_ROOT}/manifest.jsonl") | |
| if [ "${line_count}" -ne 4 ]; then | |
| echo "expected one manifest header plus 3 canary cases, got ${line_count} lines" >&2 | |
| exit 1 | |
| fi | |
| oe plan-batches \ | |
| --manifest "${RUN_ROOT}/manifest.jsonl" \ | |
| --output "${RUN_ROOT}/batches.json" \ | |
| --batch-size 3 | |
| oe stage-batch \ | |
| --manifest "${RUN_ROOT}/manifest.jsonl" \ | |
| --batch-plan "${RUN_ROOT}/batches.json" \ | |
| --batch-id batch-00000 \ | |
| --scratch-root "${SCRATCH_ROOT}" \ | |
| --output "${RUN_ROOT}/staged/canary3.jsonl" | |
| oe generate \ | |
| --staged-manifest "${RUN_ROOT}/staged/canary3.jsonl" \ | |
| --run-root "${RUN_ROOT}" \ | |
| --total-blocks "${TOTAL_BLOCKS}" | |
| oe validate-generation \ | |
| --run-root "${RUN_ROOT}" \ | |
| --output "${RUN_ROOT}/validation.json" | |
| oe setup-worldlens \ | |
| --cache-dir "${RUN_ROOT}/evaluators" \ | |
| --output "${RUN_ROOT}/worldlens-checkout.json" | |
| oe prepare-worldlens \ | |
| --staged-manifest "${RUN_ROOT}/staged/canary3.jsonl" \ | |
| --run-root "${RUN_ROOT}" \ | |
| --worldlens-root "${RUN_ROOT}/evaluators/WorldLens" \ | |
| --split "${SPLIT}" \ | |
| --method-name omnidreams \ | |
| --write-config \ | |
| --force | |
| uv run --locked \ | |
| --package flashdreams-omnidreams \ | |
| --with hydra-core \ | |
| --with omegaconf \ | |
| --with openai-clip \ | |
| --with loguru \ | |
| --with decord \ | |
| --with tqdm \ | |
| omnidreams-eval worldlens-evaluate \ | |
| --worldlens-root "${RUN_ROOT}/evaluators/WorldLens" \ | |
| --split "${SPLIT}" \ | |
| --method-name omnidreams \ | |
| --python python | |
| oe summarize-run \ | |
| --run-root "${RUN_ROOT}" | |
| oe check-baseline \ | |
| --summary "${RUN_ROOT}/evaluation-summary.json" \ | |
| --baseline "${BASELINE}" \ | |
| --output-json "${RUN_ROOT}/baseline-check.json" | |
| - name: Trim uv cache for upload | |
| if: always() | |
| run: | | |
| cache_dir="${UV_CACHE_DIR:-/github/home/.cache/uv}" | |
| echo "=== Cache size before trim ===" | |
| du -sh "${cache_dir}" || true | |
| du -sh "${cache_dir}"/*/ 2>/dev/null || true | |
| # Remove pre-built wheels; the proxy cache can re-download them | |
| # faster than GitHub can upload and restore a multi-GB uv cache. | |
| rm -rf "${cache_dir}/wheels-v6" | |
| # Remove unzipped wheel archives; uv can re-extract these on demand. | |
| rm -rf "${cache_dir}/archive-v0" | |
| # Remove build artifacts from git checkouts that bloat the cache but | |
| # are not needed for reuse. | |
| find "${cache_dir}/git-v0/checkouts" \ | |
| \( -name "build" -o -name "*.egg-info" -o -name "__pycache__" \) \ | |
| -type d -exec rm -rf {} + 2>/dev/null || true | |
| # Remove editable installs; workspace packages rebuild quickly. | |
| rm -rf "${cache_dir}/sdists-v9/editable" | |
| echo "" | |
| echo "=== Cache size after trim ===" | |
| du -sh "${cache_dir}" || true | |
| du -sh "${cache_dir}"/*/ 2>/dev/null || true | |
| echo "" | |
| echo "=== Cached built wheels (sdists-v9) ===" | |
| find "${cache_dir}/sdists-v9" -name "*.whl" -exec ls -lh {} \; 2>/dev/null || true | |
| - name: Upload canary artifacts | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: omnidreams-worldlens-canary | |
| path: | | |
| ${{ env.RUN_ROOT }}/manifest.jsonl | |
| ${{ env.RUN_ROOT }}/batches.json | |
| ${{ env.RUN_ROOT }}/staged/canary3.jsonl | |
| ${{ env.RUN_ROOT }}/validation.json | |
| ${{ env.RUN_ROOT }}/evaluation-summary.json | |
| ${{ env.RUN_ROOT }}/evaluation-summary.md | |
| ${{ env.RUN_ROOT }}/baseline-check.json | |
| ${{ env.RUN_ROOT }}/generated/*/generated.mp4 | |
| ${{ env.RUN_ROOT }}/generated/*/generation.json | |
| ${{ env.RUN_ROOT }}/generated/*/flashdreams-run.log | |
| ${{ env.RUN_ROOT }}/evaluators/WorldLens/cache/eval_logs/** | |
| ${{ env.RUN_ROOT }}/evaluators/WorldLens/generated_results/omnidreams/stage_manifest.json | |
| ${{ env.RUN_ROOT }}/evaluators/WorldLens/generated_results/omnidreams/*/*.json | |
| if-no-files-found: ignore |