Skip to content

Document Vision v8 ONNX validation - #10

Merged
Complexity-ML merged 1 commit into
Complexity-ML:mainfrom
milliyin:v8-onnx-validation-report
Aug 21, 2026
Merged

Complexity-ML merged 1 commit into
Complexity-ML:mainfrom
milliyin:v8-onnx-validation-report

Conversation

@milliyin

Copy link
Copy Markdown
Contributor

Summary

  • Add a TR-HASH Vision v8 ONNX validation report with export, parity, benchmark, file size, and SHA-256 details.
  • Add metadata JSON for both exported branches: O2M and NMS-free.
  • Add calibrated v8 raw-logit parity thresholds to automated export validation.

Artifact handling

Generated ONNX binaries are not committed to the source repository.

The report documents the expected GitHub Release assets:

  • tr_hash_v8_o2m.onnx
  • tr_hash_v8_o2m.json
  • tr_hash_v8_nms_free.onnx
  • tr_hash_v8_nms_free.json

The report includes SHA-256 hashes and file sizes for verifying uploaded release artifacts.

Validation

  • python -m pytest tests/test_detector_export.py
  • scripts/check_onnx_parity.py full 5-test O2M parity with calibrated default tolerance
  • scripts/check_onnx_parity.py full 5-test NMS-free parity with calibrated default tolerance

@Complexity-ML Complexity-ML left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Thanks — the validation report, metadata, artifact handling, and calibrated v8 tolerances look good overall. I found one blocking regression in the default sidecar-less parity flow. Please fix it and add the regression test described inline. Also please ensure the Detector export GitHub Actions workflow runs green before merge; at review time only GitGuardian had completed.

branch = metadata.get("branch", "auto")
if branch not in {"nms-free", "o2m"}:
raise ValueError(f"invalid export branch in {metadata_path}: {branch}")
raise ValueError(f"invalid export branch in ONNX metadata: {branch}")

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

When the ONNX sidecar is absent, sidecar_metadata() returns {}, so metadata.get("branch", "auto") yields "auto" and this raises. That breaks the previous/default --branch auto behavior even though RawDetectorExport can resolve auto, and it contradicts the CLI help saying metadata is optional. Please return "auto" when branch metadata is absent (while still rejecting an explicitly invalid value) and add assert branch_from_sidecar({}, "auto") == "auto" as a regression test.

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