Publish a model¶
The repository is created if it does not exist. Review first with --stage-only, which
assembles everything and runs the checks without opening a connection.
The card is generated, not written¶
A model card written by hand drifts from the model within one release. This one is built from the committed evaluation reports, so every number on it is the number the harness measured and the card cannot claim something the reports do not support.
Three things are mandatory, and the generator refuses without them.
The licence notice. The corpus is published under the Open Database License. A trained model is a "Produced Work" under that licence, and section 4.3 requires any public use of a Produced Work to carry a notice saying the content came from the database and that the database is available under the ODbL. That is a legal obligation, not a courtesy.
The device disclaimer, placed above the results. Anything that arrives on a model hub with clinical-sounding metrics and no disclaimer will eventually be used by someone who did not read the repository.
The limitations, before the numbers, so a reader who stops halfway has still read them.
A card with no external result is refused outright:
error: a model card must carry an external result. Publishing only the site a model was
trained on is the failure this project exists to argue against.
Nothing that could carry a patient row¶
The uploader scans the staged directory before it opens a connection and refuses on any
.psv, .parquet, .csv, .arrow, .feather, manifest.json or cohort.json:
error: refusing to publish: the staged directory holds files that may carry patient
data: siteA.parquet. Model repositories carry weights and reports, never the corpus.
The check is deliberately dumb, an extension and filename match a reader can verify at a glance, because a clever heuristic here is one nobody trusts, and a patient row on a public model hub is not recoverable.
What travels¶
| File | What it is |
|---|---|
README.md |
the generated card |
booster.txt, model.json |
the model and how to rebuild it |
alert_policy.json |
the threshold and the promise it was chosen under |
prodrome_config.json |
the feature and model configuration needed to reload |
reports/*.json |
the evaluation reports the card quotes |
ablation.md |
what the model was found to be reading |
The preprocessing travels with the weights, because a clinical model without its feature pipeline is not a model, it is a liability.
Publish the baseline too¶
The clock reaches most of the trained model's utility score with three features and no physiology. Publishing it is the point rather than an embarrassment: it is the number that makes the rest of the results legible.
PyPI and the source release¶
Releases are cut from a tag and published by trusted publishing, so no token is stored anywhere:
The workflow re-runs the tests on the tagged commit, checks the tag against the packaged version, greps the distributions for corpus files, publishes to PyPI and creates the GitHub release.
Model artefacts are deliberately not published from CI. They depend on the corpus,
which that workflow never downloads, so prodrome publish runs from a machine that
already holds the data and the numbers it measured.