Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dashboard.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dashboard.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# PyAutoInsight — inference control room

<!-- insight-inputs:9db3e6e97a334957005fd43f17fa206ad9c2c62e5e34d489fa51e61d318c92da -->
<!-- insight-inputs:764835307ab9042d793fc424008db7f4f1b21ca6e672f924e21dd2a696c5d281 -->

| Where | Count |
|---|---:|
Expand Down
3 changes: 0 additions & 3 deletions registry.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ instances:
repo: autofit_inference
summary_path: dashboard/summary.json
supported_schema: inference-summary@3
# Until the first @3 capture: the committed @1 snapshot stays valid last-good
# evidence. Remove once snapshots/fit.json is @3 (B5b-2, autofit_inference#12).
migrating_from: inference-summary@1
dashboard_url: https://github.com/PyAutoLabs/autofit_inference#readme
library_refs: [PyAutoFit]
cortex_project: autofit_inference
22 changes: 19 additions & 3 deletions tests/test_fit_acceptance.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
from collections import Counter
from pathlib import Path

from insight import summary

ROOT = Path(__file__).resolve().parents[1]
PILOT_RECORDS = 223
#: The B3 pilot (autofit_inference 900648b) carries producer revision 0c87bf1; the B3c
Expand All @@ -37,14 +39,28 @@ def _load(kind):
return json.loads((ROOT / kind / "fit.json").read_text())


def _records(doc):
"""The capture's records: inline for v1/v2, assembled from the committed shards
under ``snapshots/fit/`` for a v3 index (B5b-2 moved ``fit`` to
``inference-summary@3``; the pilot rows live in the ``gaussian_x3@1`` shards)."""
if doc.get("version") != summary.SHARDED:
return doc["records"]
assembled, errors = summary.load_sharded(
doc, lambda path: (ROOT / "snapshots" / "fit" / path).read_bytes()
)
assert not errors, errors
return assembled["records"]


def test_fit_capture_holds_the_wave1_pilot():
snap, receipt = _load("snapshots"), _load("receipts")
doc = snap["summary"]
assert receipt["outcome"] == "ok"
assert receipt["resolved_commit"] == snap["commit"]
assert not any(snap["commit"].startswith(c) for c in PRE_PILOT_COMMITS)
assert receipt["record_count"] == len(doc["records"])
pilot = [r for r in doc["records"] if r["configuration"].get("pilot") is True]
recs = _records(doc)
assert receipt["record_count"] == len(recs)
pilot = [r for r in recs if r["configuration"].get("pilot") is True]
assert len(pilot) == PILOT_RECORDS, "the fit capture lost or never had the B3 pilot"
assert doc["coverage"]["observed"]["records"] >= PILOT_RECORDS

Expand All @@ -55,5 +71,5 @@ def test_fit_capture_counts_match_the_known_producer_revision():
if expected is None:
# A later producer revision: only the pilot-presence invariant above applies.
return
got = Counter(r["scientific"]["acceptance"] for r in doc["records"])
got = Counter(r["scientific"]["acceptance"] for r in _records(doc))
assert dict(got) == expected
Loading