-
Notifications
You must be signed in to change notification settings - Fork 55
Expand file tree
/
Copy pathomnidreams-worldlens-canary.yml
More file actions
226 lines (196 loc) · 7.95 KB
/
Copy pathomnidreams-worldlens-canary.yml
File metadata and controls
226 lines (196 loc) · 7.95 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
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