Skip to content

Governance and reports

from symphony_dt.governance import RunManifest, ProvenanceDocument, data_card_markdown
manifest = RunManifest.create("evaluate", model="pd_v2", dataset_fingerprint=ds.fingerprint(),
                              seeds={"bootstrap": 20261021})
manifest.write("manifest.json")
ProvenanceDocument.for_run("evaluate", {"data": ds.fingerprint()}, {"scores": scores.sha256()}).write("prov.json")
print(data_card_markdown(ds, source="my cohort"))
  • freeze_spec, require_frozen and DeviationRecord implement pre-registration.
  • model_card_markdown returns the model card with verified digests.
  • tripod_ai_items and tripod_ai_report help you report your own study against TRIPOD+AI.
  • probast_items and probast_appraisal help you appraise a study against PROBAST+AI; see below.
  • reproduce(manifest) reruns a recorded CLI command and compares output digests.
  • symphony_dt.report.write_html_report writes a self-contained HTML report.

PROBAST+AI appraisal (TESTED)

PROBAST appraises prediction model studies in four domains: participants and data sources, predictors, outcome and analysis. PROBAST+AI updates it in two parts. The development part rates concern for the quality of how a model was built. The evaluation part rates the risk of bias in its performance estimates. probast_items lists our paraphrased prompts for one part, each with an id. probast_appraisal turns your answers into domain and overall judgements.

from symphony_dt.governance import probast_appraisal, probast_items

answers = {item["id"]: "yes" for item in probast_items("evaluation")}
answers["analysis.sample_size"] = "no information"
appraisal = probast_appraisal(
    answers,
    part="evaluation",
    applicability={"participants": "low", "predictors": "low", "outcome": "unclear"},
    title="PROBAST+AI appraisal of my study",
)
print(appraisal.overall, appraisal.applicability_overall)  # unclear unclear
print(appraisal.to_markdown())

Answers are yes, probably yes, probably no, no, no information or not applicable. A domain is high when any answer is no or probably no. It is low when every applicable answer is yes or probably yes. It is unclear otherwise, including when a prompt is left unanswered. The overall judgement is low when every domain is low, high when any is high and unclear otherwise. Applicability concern is rated by you for the first three domains and combined the same way.

The rule gives a default judgement for the assessor to review. Both tools say a no answer does not by itself force a high rating. Pass overrides={"analysis": ("low", reason)} to change a domain, or overall_override for the overall call. One case is a model evaluated only within its development data: PROBAST allows a low rating after a very large fit with internal validation. The table keeps both the rule's judgement and yours, with the reason.

The prompts paraphrase the signalling questions and are not the tool itself. For the authoritative wording, numbering and elaboration, see Wolff et al. (2019, Ann Intern Med 170:51-58). See also Moons et al. (2025, BMJ 388:e082505). Answers are not prefilled from a run, since each one is a judgement about study design and conduct. An appraisal describes how a study was done and reported. It makes no causal, treatment or deployment claim.

Credibility plan (TESTED)

ASME V&V 40-2018 sets out a risk-informed way to plan the credibility of a computational model. The FDA guidance of November 2023 on computational modelling in device submissions uses the same framework. credibility_plan writes a plan in that style. You state the question of interest and the context of use, the role the model plays in answering it. You also rate model influence and decision consequence as low, medium or high.

from symphony_dt.governance import credibility_plan, model_risk
plan = credibility_plan(
    "Will a participant's UPDRS-III worsen by 5 points or more within two years?",
    "A research forecast read beside clinical assessment in an observational study.",
    model_influence="medium",
    decision_consequence="medium",
    manifests=["fit/fit_manifest.json", "study/04_split/manifest.json", "study/08_evaluate/manifest.json"],
    supplied={"sbc": "sbc/sbc_report.json from symphony-dt sbc"},
)
print(plan.model_risk)        # medium, from model_risk("medium", "medium")
print(plan.to_markdown())     # goals and evidence per factor
plan.table                    # one row per evidence item, with status and source

Model risk comes from a small matrix, printed in every plan and held in MODEL_RISK_MATRIX. The matrix is an illustrative mapping. The standard leaves the matrix to the user, so replace it when your setting calls for it.

The plan has seven credibility factors. Verification covers code and calculation. Validation covers model form, model inputs, the comparator and the assessment of agreement. Applicability covers how far the validation evidence bears on the context of use. Each factor has a goal that adds requirements as model risk rises. Each goal lists the evidence that would meet it, keyed so you can supply your own through supplied.

Evidence is filled from run manifests only where a manifest records it. Each filled item cites its manifest by kind, digest and time. The fields read are these:

  • model and model_sha256, checked against the registered model digest, for code verification.
  • package_version, for code verification.
  • gates: the convergence verdicts, divergences and any threshold override, for calculation verification.
  • data_sha256, the Stan data digest, for model inputs.
  • outputs with held-out target and participant counts, as a study split stage writes them, for the comparator.
  • specification, the frozen scoring specification and any deviation, for the assessment of agreement.
  • dataset_fingerprint, for applicability.

No run manifest records a simulation-based calibration verdict, held-out scores or cohort names. These stay "to be supplied", with the evidence each needs.

The plan states goals and lists evidence. It never marks a goal as met, and a found item is not a verdict on the factor. The plan is a template for your own credibility assessment. symphony-dt makes no claim that any context of use is supported, and makes no deployment claim. Factor names and goals paraphrase the standard in this package's words; read the standard for the authoritative text. The FDA guidance addresses physics-based, mechanistic and other first-principles models, so judge whether it applies to your model.