meddeid-training
Training and export tools for MedDeID sequence-labeling models. Researchers can run one ordinary fit, while release workflows can separate epoch selection from the final full-data fit so a benchmark remains sealed during model selection.
The training and evaluation workflow shows the cross-suite handoffs. This repository and its training protocol remain authoritative for configuration, fitting, refitting, and export.
Installation
python -m pip install 'meddeid-training[train]'
One-time training
For an ordinary research run, fit once using separate train, validation, and test files. Validation chooses the best checkpoint and the test set is evaluated after training:
meddeid-train fit \
--config configs/release.yaml \
--data prepared/fit \
--run runs/fit
Use --epochs N to override the maximum configured epoch count. The resulting
checkpoint is runs/fit/checkpoints/best.pt.
Publication protocol
- Create a held-out validation subset from the 6,493-document synthetic development corpus.
- Select an epoch count using only that validation subset.
- Restart from the configured initial model and refit on the complete corpus for the selected number of epochs.
- Evaluate once on the independent 300-document synthetic benchmark.
- Export a self-contained Safetensors model bundle.
meddeid-train select-epochs \
--config configs/release.yaml \
--data prepared/selection \
--run runs/selection
meddeid-train refit \
--config configs/release.yaml \
--selection runs/selection/run.json \
--data prepared/refit \
--run runs/refit
meddeid-train export \
--checkpoint runs/refit/checkpoints/best.pt \
--run-metadata runs/refit/train_metrics.json \
--output release/meddeid-dutch-synth
configs/release.yaml initializes both stages from the complete
stighellemans/meddeid-dutch-synth bundle, including its encoder and trained
classifier heads. To train new heads from a base encoder, set that encoder as
model_name and pin its immutable model_revision.
The select-epochs and refit commands deliberately name the two stages of
this stricter protocol; they are not required for an ordinary one-time fit.
Selection and refit always restart independently from the configured initial
model; refit never continues from the selection checkpoint. Dataset manifests,
model revisions, ordered labels, run configuration, and output checksums are
recorded for reproducibility.
See Release training protocol for input layout, stage invariants, configuration, and export requirements.
Development
pip install -e '.[dev]'
pytest
Licence
AGPL-3.0-only. Datasets and model artifacts are distributed separately under the terms stated with each artifact.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file meddeid_training-0.1.1.tar.gz.
File metadata
- Download URL: meddeid_training-0.1.1.tar.gz
- Upload date:
- Size: 45.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
53e3b0c418c831a977546603249ff3c53488d18aebffbdeab5dfc9d898e5e387
|
|
| MD5 |
bef123d658c4d4acd1d646bad947360d
|
|
| BLAKE2b-256 |
360c9defb7fcbe554eb5b3ae6091730aad37073a739e8e87652070f9bcc87fd0
|
Provenance
The following attestation bundles were made for meddeid_training-0.1.1.tar.gz:
Publisher:
publish-python.yml on stighellemans/meddeid-training
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
meddeid_training-0.1.1.tar.gz -
Subject digest:
53e3b0c418c831a977546603249ff3c53488d18aebffbdeab5dfc9d898e5e387 - Sigstore transparency entry: 2498915725
- Sigstore integration time:
-
Permalink:
stighellemans/meddeid-training@a4aef1be7983fe6d245d63af68a1292bc5ca109f -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/stighellemans
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-python.yml@a4aef1be7983fe6d245d63af68a1292bc5ca109f -
Trigger Event:
push
-
Statement type:
File details
Details for the file meddeid_training-0.1.1-py3-none-any.whl.
File metadata
- Download URL: meddeid_training-0.1.1-py3-none-any.whl
- Upload date:
- Size: 43.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
854c4f26f07cd5f0b8139cc3554ad2c008c1395c7a8cc9e83f73da3a1b3ac693
|
|
| MD5 |
832525d01020ebd432df4005f974e97c
|
|
| BLAKE2b-256 |
43f500cfafa88321335f6b95cc63f4407ef3d205947c28bb46984a39856397a1
|
Provenance
The following attestation bundles were made for meddeid_training-0.1.1-py3-none-any.whl:
Publisher:
publish-python.yml on stighellemans/meddeid-training
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
meddeid_training-0.1.1-py3-none-any.whl -
Subject digest:
854c4f26f07cd5f0b8139cc3554ad2c008c1395c7a8cc9e83f73da3a1b3ac693 - Sigstore transparency entry: 2498915740
- Sigstore integration time:
-
Permalink:
stighellemans/meddeid-training@a4aef1be7983fe6d245d63af68a1292bc5ca109f -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/stighellemans
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-python.yml@a4aef1be7983fe6d245d63af68a1292bc5ca109f -
Trigger Event:
push
-
Statement type: