cyto_dl.api.cyto_dl_model.cyto_dl_base_model module#

class cyto_dl.api.cyto_dl_model.cyto_dl_base_model.CytoDLBaseModel(cfg: DictConfig)[source]#

Bases: ABC

A CytoDLBaseModel is used to configure, train, and run predictions on a cyto-dl model.

Not intended for direct use by clients.

Please see the classmethod factory methods instead.

classmethod from_default_config(spatial_dims: int)[source]#

Returns a model from the default config.

Parameters:

spatial_dims – dimensions for the model (e.g. 2)

classmethod from_existing_config(config_filepath: Path)[source]#

Returns a model from an existing config.

Parameters:

config_filepath – path to a .yaml config file that will be used as the basis

for this CytoDLBaseModel (must be generated by the CytoDLBaseModel subclass that wants to use it).

get_config() DictConfig[source]#
get_experiment_name() str[source]#
predict(manifest_path: str | Path, output_dir: str | Path, checkpoint: Path) None[source]#
save_config(path: Path) None[source]#
set_experiment_name(name: str) None[source]#
train(max_epochs: int, manifest_path: str | Path, output_dir: str | Path, checkpoint: Path | None = None) None[source]#