Skip to content

feat(cli): warn on torch/onnxruntime version mismatch in export cache#219

Open
mvanhorn wants to merge 1 commit into
FastCrest:mainfrom
mvanhorn:fix/47-export-cache-torch-ort-version
Open

feat(cli): warn on torch/onnxruntime version mismatch in export cache#219
mvanhorn wants to merge 1 commit into
FastCrest:mainfrom
mvanhorn:fix/47-export-cache-torch-ort-version

Conversation

@mvanhorn
Copy link
Copy Markdown

@mvanhorn mvanhorn commented Jun 7, 2026

Summary

Export caches were reused even when the torch / onnxruntime versions had changed, which can silently produce a stale or incompatible cached artifact (#47). The CLI now records the build-time torch and ORT versions in the cache metadata and warns on a mismatch at load.

Changes

  • cli.py: capture current torch.__version__ / onnxruntime.__version__ (falling back to "unknown" when unavailable) and store them in the cache metadata; on load, compare against the cached values and emit a clear mismatch warning.

Testing

PYTHONPATH=src python3 -m pytest tests/test_cli.py — 15 passed, including version-match (no warning) and version-mismatch (warns) cases.

Closes #47

AI was used for assistance.

… on mismatch

Stores build-time torch and onnxruntime versions in cache metadata and warns
at load when they differ from the current environment, so a stale/incompatible
cached export isn't reused silently.

Closes FastCrest#47

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@mvanhorn mvanhorn requested a review from rylinjames as a code owner June 7, 2026 16:14
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.

[Reliability] Expand Export Cache Invalidation to Track Torch/ORT Versions

1 participant