Repository navigation
feat(validation): make the callable check usable on CPU and on any structure - #95
Merged
Merged
Conversation
…ructure Tracking: #61 (model-support spec §6.2) What was failing: scripts/validate_runtime.py did not import -- it asked mliport.neb.workflow for _hash_model, which moved to mliport.model_record -- and it hard-coded device="cuda:0", UMA's "omat" task, a Cu cell and a "v100-" evidence prefix. It could not check a CPU run, a different structure or a non-UMA task, so it was not the reusable probe the model-support checks need. What changes: - --device (cpu | cuda:N) is required and validated. A cpu run needs no GPU UUID and now fails closed if the runtime reports a CUDA placement; a cuda:N run keeps the UUID confirmation, hashes the UUID as before, and additionally rejects a model that landed on another ordinal. - --structure replaces the built-in rattled fcc Cu cell and is identified in the report by SHA-256, symbols, atom count, cell and PBC -- never by path. - --task names the model task family: required for uma, "bulk" otherwise. - The evidence id names the device type (cpu-.../cuda-...), the hardware block is written only for GPU runs, and the peak-VRAM probe is skipped on CPU. - The report schema is mliport.runtime-validation/2; existing v100 records stay on /1. - The five-image NEB of --full reuses the fixture and relaxes its endpoints, so the check measures the band rather than the fixture's initial forces. - Real backends found three follow-ups, all fixed here: GRACE rejects the GPU-only gpu_memory_limit_mb on CPU; dpa and grace require process-level device isolation and refuse to run without CUDA_VISIBLE_DEVICES, so the probe now says so with the exact command instead of failing inside the adapter. - tests/mliport/mliport/test_validate_runtime_probe.py drives argument handling, the CPU/CUDA branches, the isolation preflight and the GRACE kwargs with a LennardJones stub: no weights, no GPU, no downloads. - docs/validation.md (+ .zh.md) documents the usage. Evidence: all 15 in-scope MACE/DPA/GRACE profiles completed this probe on both devices (see #75). DATA IMPACT: no scientific record invalidated. No stored evidence was rewritten; old records keep their schema and ids.
Resolve the CHANGELOG `Unreleased` conflict by keeping both entries: the DPA-3.1 lossless-widening note from #98 and this branch's probe note. No code file conflicted. DATA IMPACT: none. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GYQHUBfRm75zyaocAPWhEb
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Tracking: #61 (model-support spec §6.2). Draft: ready for independent review.
What was wrong
scripts/validate_runtime.pycould not run at all (ImportError: cannot import name '_hash_model') and, when it did, hard-codedcuda:0, UMA'somattask, a Cu cell anda
v100-evidence prefix — so it could not check a CPU run, another structure oranother task.
What changes
--device cpu|cuda:N: a CPU run needs no GPU UUID and fails closed if theruntime reports CUDA; a CUDA run keeps the UUID/ordinal confirmation.
--structure(any ASE-readable file, 2-32 unconstrained atoms), recorded by SHA-256,symbols, cell and PBC — never by path.
--task: required foruma,bulkotherwise.peak-VRAM probe skipped on CPU. Report schema
mliport.runtime-validation/2.--fullreuses the fixture and relaxes NEB endpoints.dpa/gracerequireCUDA_VISIBLE_DEVICESisolation, so the probe refuses to startwithout it and prints the exact command.
branches, isolation preflight, GRACE kwargs.
docs/validation.md(+.zh.md).Evidence
All 15 in-scope MACE/DPA/GRACE profiles completed this probe on CPU and GPU on the
V100 host; the records are in #75.
Tests
pytest tests/mliport/mliport/test_validate_runtime_probe.py tests/mliport/mliport/test_docs_contract.py -q→ 69 passed.DATA IMPACT
No scientific record invalidated; no stored evidence rewritten. Old
/1records keeptheir schema and ids.