fix(openfold3): load the selected product runtime - #1245
chaofengw-nv wants to merge 1 commit into
Conversation
The separately built qualification executable searches its native build for libtrtmc_runtime.so while loading backend and family plugins from the selected wheel. Those product builds can differ, so the runtime loader rejects the backend before structure prediction starts. Resolve the selected core's companion loader and prepend that library directory to the qualification subprocess's search path. Handle both copied and symlinked staged roots without changing the parent environment or any prediction acceptance criteria. Add a compiled qualification regression with two runtime/core/backend builds and a missing-loader check. Both layouts fail before the fix and pass afterward; all 20 selected OpenFold3 CPU tests pass. A separate probe also verifies the real product-build guard. Full checkpoint GPU E2E remains to be validated. Signed-off-by: chaofengw <chaofengw@nvidia.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (4)
Included review availability: Your plan provides up to 12 included reviews per hour; 10 remain after this review. 📝 SummarySummaryOpenFold3 qualification E2E execution now selects the runtime and core libraries paired with the selected wheel plugins.
New CPU regression fixtures validate copied and symlinked runtime roots, distinct build identities, incorrect inherited library paths, and missing-loader rejection. Prediction acceptance criteria remain unchanged. Validation passed for OpenFold3 runtime tests, selected OpenFold3 tests, Ruff, formatting, C++ formatting, impact analysis, and whitespace checks. Official-checkpoint GPU E2E validation remains outstanding. Architecture impact
HUMAN REVIEW REQUIRED — official-checkpoint GPU E2E validation is outstanding. WalkthroughOpenFold3 test support now validates build identities across fake runtime components. Native qualification execution selects the staged runtime directory, verifies its companion loader, and preserves inherited loader paths. End-to-end tests cover copied, symlinked, and incomplete runtime layouts. ChangesOpenFold3 runtime loading
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant Test
participant _run_native
participant SelectedRuntime
participant QualificationExecutable
Test->>_run_native: invoke qualification executable
_run_native->>SelectedRuntime: resolve core and companion loader
_run_native->>QualificationExecutable: launch with selected LD_LIBRARY_PATH
QualificationExecutable-->>Test: return validated build identity
Merge Risk: ⚪ Minimal · up to Qualification execution now loads the runtime paired with the selected wheel libraries while preserving the parent environment. The changed runtime-selection behavior is covered by targeted regression tests, with no concrete current-head merge risk identified. 🚥 Pre-merge checks | ✅ 8 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (8 passed)
Comment |
Background
OpenFold3's qualification executable is built in a separate native build tree, but its E2E test selects backend and model plugins from the installed wheel. The executable's default library search path can load the source-built runtime against those wheel plugins. Strict product-build identity checks then reject the backend before structure prediction begins.
Exit Criteria
Implementation
Resolve the staged core library and prepend its companion loader directory to
LD_LIBRARY_PATHfor the qualification subprocess. Require that companion loader to exist. This keeps the runtime selection local to OpenFold3's E2E invocation.The regression compiles the existing qualification executable and two sets of small CPU runtime/core/backend fixtures with different build identities. It tests both staging layouts with an inherited library path that points to the wrong build, plus missing-loader rejection.
Change categories
Validation
Commands and Results
python -m pytest families/openfold3/tests/test_e2e_runtime.py -q: the two cross-build layout cases failed before the fix with a runtime/core/backend build mismatch and passed after the fix.python -m pytest families/openfold3/tests -q -k 'not official_checkpoint_e2e': 20 passed, 1 official-checkpoint E2E case deselected; includes the added missing-loader case.python -m ruff check families/openfold3/tests/test_e2e.py families/openfold3/tests/test_e2e_runtime.py: passed.python -m ruff format --check families/openfold3/tests/test_e2e.py families/openfold3/tests/test_e2e_runtime.py: passed.clang-format --dry-run --Werror families/openfold3/tests/cpp/fake_build_identity.cpp families/openfold3/tests/cpp/fake_qualification_runtime.cpp: passed.python -m tools.community_ci impact --base github/main: onlyopenfold3selected.python -m tools.community_ci source-quality --base github/main: passed; 128 architecture and source-quality tests passed.git diff --check github/main...HEAD: passed.Hardware, Environment, and Revisions
CPU execution on Linux x86_64 with Python 3.12.3 and the system C++ compiler. The regression uses synthetic runtime fixtures, the production qualification executable, and the real OS dynamic linker; it needs no CUDA device or checkpoint. Tested change:
3de2a56e5ec820e785a66835433dd897d99aff2b, based on5c0bedd8549fd60eec3340a51477d83a20d91c54.Not Run / Remaining Gaps
Full official-checkpoint GPU E2E has not been rerun. The CPU evidence verifies product-library selection and does not establish structure-prediction accuracy or performance. Protected premerge validation remains required.
Contributor Self-Review
Notes For Future Readers
The qualification executable remains separately compiled against the same source interfaces. Its child environment must select the wheel's loader and core together with the wheel's plugins. This also supports the product-build identity enforcement introduced in #1190. Prediction thresholds, runtime loader guards, shared CI code, and public interfaces are unchanged.
Risk level
The change affects one family's test subprocess environment and is covered by actual compilation and dynamic loading. Official-checkpoint GPU validation is still needed.