1 vin.diagnostics.qh_export
vin.diagnostics.qh_export
Offline rendering of the same measured Q_H evidence shown in Streamlit.
Export consumes a materialized snapshot; it cannot read a dataset, construct a model or run inference. Plotly specifications are retained beside static assets so a figure’s displayed values remain auditable. The guide embeds its figures, which makes both local-file and HTTP previews independent of an asset server.
1.1 Functions
| Name | Description |
|---|---|
| qh_snapshot_json | Serialize detached measurements for identical UI and CLI downloads. |
| update_qh_guide | Replace the measured section in the tracked guide without copying its prose. |
| write_qh_evidence | Render static assets and return a self-contained educational HTML section. |
1.1.1 qh_snapshot_json
vin.diagnostics.qh_export.qh_snapshot_json(snapshot)Serialize detached measurements for identical UI and CLI downloads.
Non-finite JSON numbers are rejected: missing numeric evidence must already be represented as None by its domain reducer, with explicit support.
1.1.2 update_qh_guide
vin.diagnostics.qh_export.update_qh_guide(guide, section)Replace the measured section in the tracked guide without copying its prose.
The two markers delimit generated evidence only. Author-written educational chapters remain the single maintained source. First insertion precedes the forward-pass chapter; subsequent calls replace exactly that marked region.
1.1.3 write_qh_evidence
vin.diagnostics.qh_export.write_qh_evidence(snapshot, destination)Render static assets and return a self-contained educational HTML section.
1.1.3.1 Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| snapshot | QhEvidenceSnapshot | The frozen result used by the Streamlit panels. | required |
| destination | Path | Resolved output directory owned by this evidence export. | required |
1.1.3.2 Returns
| Name | Type | Description |
|---|---|---|
| str | HTML containing inline figures, DTO rows, source identities and figure | |
| str | explanations. No external JavaScript, font or network service is needed. |
1.1.3.3 Notes
Figures are rendered to a temporary directory before publishing output files. A renderer failure leaves existing evidence files untouched. The manifest binds evidence, canonical figure JSON, assets, notation and renderer versions; it does not attest to learned model quality.