Model Description
Module use to build BMZ model description.
create_model_description(config, name, general_description, data_description, authors, inputs, outputs, weights_path, torch_version, careamics_version, config_path, env_path, covers, channel_names=None, model_version='0.1.0')
Create model description.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
config
|
Configuration
|
CAREamics configuration. |
required |
name
|
str
|
Name of the model. |
required |
general_description
|
str
|
General description of the model. |
required |
data_description
|
str
|
Description of the data the model was trained on. |
required |
authors
|
list[Author]
|
Authors of the model. |
required |
inputs
|
Union[Path, str]
|
Path to input .npy file. |
required |
outputs
|
Union[Path, str]
|
Path to output .npy file. |
required |
weights_path
|
Union[Path, str]
|
Path to model weights. |
required |
torch_version
|
str
|
Pytorch version. |
required |
careamics_version
|
str
|
CAREamics version. |
required |
config_path
|
Union[Path, str]
|
Path to model configuration. |
required |
env_path
|
Union[Path, str]
|
Path to environment file. |
required |
covers
|
list of pathlib.Path or str
|
Paths to cover images. |
required |
channel_names
|
Optional[list[str]]
|
Channel names, by default None. |
None
|
model_version
|
str
|
Model version. |
"0.1.0"
|
Returns:
| Type | Description |
|---|---|
ModelDescr
|
Model description. |
extract_model_path(model_desc)
Return the relative path to the weights and configuration files.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
model_desc
|
ModelDescr
|
Model description. |
required |
Returns:
| Type | Description |
|---|---|
tuple of (path, path)
|
Weights and configuration paths. |