class CheckpointModel(loggers.ModelLoggerMixin, models.Model):
Results of a round of parameter sampling for one of the lymph.models.
In this database model, one can specify where (i.e., in which remote repositories)
to look for YAML files that define a model via the lyscripts.configs. The
validate_configs method is used to validate these YAML configs.
It also allows to fetch_samples (which are typically not stored in the
repository, but are referenced by DVC to be found in a remote storage) and can
precompute_priors for all T-stages and a subset of the samples.
Much of what this class sets up and precomputes is cached using joblib for
faster computation of the actual risks later on.
| Class | |
Meta options for the CheckpointModel. |
| Method | __str__ |
Return the string representation of the instance. |
| Method | compute |
Compute priors for every T-stage using the model samples. |
| Method | construct |
Create one of the lymph.models as specified in the validated configs. |
| Method | fetch |
Fetch the model samples from the HDF5 file in the DVC repo. |
| Method | get |
Fetch and merge the YAML configuration files from the repo. |
| Method | precompute |
Precompute the priors for all T-stages and cache them using joblib. |
| Method | save |
Fill the cache with precomputed priors before saving the instance. |
| Method | validate |
Validate the pydantic configs necessary for constructing the model. |
| Class Variable | dist |
Path to YAML file defining a DistributionConfig for each T-stage. |
| Class Variable | graph |
Path to YAML file containing the GraphConfig inside the git repo. |
| Class Variable | model |
Path to YAML file containing the ModelConfig inside the git repo. |
| Class Variable | num |
Number of samples to use for computing the prior risk matrices. |
| Class Variable | ref |
Git reference of the trained model. E.g., a commit hash, tag, or branch name. |
| Class Variable | remote |
Name of the DVC remote storage to fetch the samples from. |
| Class Variable | repo |
Identifier of the GitHub repository that contains the trained model. |
| Class Variable | samples |
Path to HDF5 file containing the parameter samples inside the git repo. |
| Property | is |
Check if the model is a Midline model. |
| Property | is |
Check if the model is a Unilateral model. |
lyprox.loggers.ModelLoggerMixin.saveFill the cache with precomputed priors before saving the instance.