Skip to content

Fail nightly fast on env drift vs fvdb-core - #319

Open
harrism wants to merge 2 commits into
openvdb:mainfrom
harrism:mjh/ci-torch-pin-drift-check
Open

Fail nightly fast on env drift vs fvdb-core#319
harrism wants to merge 2 commits into
openvdb:mainfrom
harrism:mjh/ci-torch-pin-drift-check

Conversation

@harrism

@harrism harrism commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Problem

The nightly builds the fvdb-core wheel using fvdb-core's env/build_environment.yml, then installs it into the benchmark env defined in this repo. When those pins disagree, the wheel is compiled against one libtorch and loaded against another, and the run dies at import fvdb:

ImportError: .../site-packages/fvdb/libfvdb.so: undefined symbol:
  _ZN3c1010ValueErrorC1ENS_14SourceLocationENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE

This has now happened three times — 1b6956f (2.8→2.10), 6c2ede6 (2.10→2.11), and the current 2.11→2.13 break (run 32362276082, fixed by #318).

The failure is both late and expensive: it only appears after the GPU runners are provisioned, and in the comparative job only after ~1h of GSplat build time. It also reports under the misleading step name "Download mipnerf360 dataset".

Change

Add a check-env-drift job that compares the pytorch-gpu, cuda-version and python pins between the two environments and fails on ubuntu-latest in seconds.

start-build-runner now also needs: check-env-drift. Every runner-provisioning job descends from that one, so gating it blocks the entire EC2 chain — verified:

Job Gated by drift check
start-build-runner yes
start-benchmarks-gpu-runner yes
start-comparative-gpu-runner yes
fvdb-reality-capture-unit-benchmarks yes
fvdb-reality-capture-comparative-benchmarks yes

Two implementation details worth review

The fvdb-core env is fetched at the pinned SHA, not read off disk. The obvious placement — after the build job's Clone fvdb-core step — is wrong, because that step is conditional:

- name: Clone fvdb-core
  if: steps.download_existing_wheel.outcome == 'failure'

On days when the cached wheel artifact hits, fvdb-core is never cloned and an on-disk check would silently skip. Fetching raw.githubusercontent.com/openvdb/fvdb-core/${FVDB_CORE_SHA}/env/build_environment.yml is cache-path independent and pins to the exact commit the wheel is built from.

An unreadable pin fails the job. Without the emptiness check, renaming or reformatting a pin line would make both grep -oP results empty, compare equal, and pass silently — a guard that quietly stops guarding.

Testing

Dry-ran the comparison logic against the real files on both sides:

DRIFT pytorch-gpu    core=2.13.0     bench=2.11.0     <- current main, correctly caught
OK    cuda-version   13.0
OK    python         3.12

and against a simulated post-#318 benchmark env, where all three keys match and the job exits 0.

Sequencing

This check will fail on main until #318 (sync benchmark env to PyTorch 2.13) merges, since that drift is real and present right now. Merge #318 first.

A companion PR adds the mirror-image check to fvdb-core PRs.

🤖 Generated with Claude Code

The nightly builds the fvdb-core wheel using fvdb-core's
env/build_environment.yml and installs it into the benchmark env defined in
this repo. When those pins disagree the wheel is compiled against one libtorch
and loaded against another, and the run dies at `import fvdb` with an
undefined-symbol ImportError -- most recently 2026-08-20, when fvdb-core moved
to PyTorch 2.13 while this repo still pinned 2.11.

That failure is both late and expensive: it surfaces only after the GPU runners
are provisioned, and in the comparative job only after roughly an hour of build
time. Add a check-env-drift job that compares the pytorch-gpu, cuda-version and
python pins and fails on ubuntu-latest before any EC2 instance is started.

start-build-runner now also needs check-env-drift. Every runner-provisioning
job descends from it, so gating that one job blocks the whole EC2 chain.

Two implementation notes:

- The fvdb-core environment is fetched at the exact commit the run builds from
  rather than read off disk. The build job clones fvdb-core only when no cached
  wheel artifact exists, so an on-disk check would silently skip on cache hits.
- An unreadable pin fails the job. Without that, renaming or reformatting a pin
  line would compare empty to empty and pass silently.

This is the third occurrence of this drift (1b6956f 2.8->2.10, 6c2ede6
2.10->2.11, and the 2.11->2.13 break above).

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Mark Harris <mharris@nvidia.com>
@harrism
harrism requested a review from a team as a code owner August 21, 2026 04:33
@harrism
harrism requested review from matthewdcong and swahtz and removed request for a team August 21, 2026 04:33
@harrism
harrism requested a balanced review from Copilot August 21, 2026 05:02

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Codex review found that check-env-drift checked out the workflow's triggering
ref, while the build and benchmark jobs check out
${{ github.event.inputs.branch || 'main' }}.

For the scheduled run those are the same, so the gate behaved correctly. For a
workflow_dispatch run against a branch they diverge: the gate would validate
main's benchmark_environment.yml, pass, and let both EC2 chains start, while
the build and benchmarks used the dispatched branch's pins. That is exactly
the false-negative this job exists to prevent, on the one code path where a
human is most likely testing a pin change.

Pin the gate's checkout to the same expression. Verified afterwards that all
five runner-provisioning jobs remain transitively gated and that the always()
stop-runner jobs are unchanged, so no EC2 instance can leak.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Mark Harris <mharris@nvidia.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants