modosaic.cli.pipeline¶
modosaic.cli.pipeline ¶
Runtime builders used by the Modosaic CLI.
PipelineRun
dataclass
¶
PipelineRun(results, experiment_path)
Result of one CLI-triggered pipeline execution.
Attributes:
| Name | Type | Description |
|---|---|---|
results |
list[Any]
|
Per-sample pipeline results. |
experiment_path |
Path
|
Directory where artifacts were written. |
build_dataset ¶
build_dataset(config)
Build an ImageDataset from dataset configuration.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
config
|
DatasetConfig
|
Dataset configuration. |
required |
Returns:
| Type | Description |
|---|---|
ImageDataset
|
Configured image dataset. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If the dataset kind is unsupported or required paths are absent. |
Source code in modosaic/cli/pipeline.py
112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 | |
build_modalities ¶
build_modalities(config)
Build configured modalities for a run.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
config
|
RunConfig
|
Run configuration. |
required |
Returns:
| Type | Description |
|---|---|
list[Modality[Any]]
|
List of configured modalities in execution order. |
Source code in modosaic/cli/pipeline.py
147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 | |
execute_run ¶
execute_run(config)
Execute a complete run from a normalized config.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
config
|
RunConfig
|
Normalized run configuration. |
required |
Returns:
| Type | Description |
|---|---|
PipelineRun
|
Pipeline results and experiment path. |
Raises:
| Type | Description |
|---|---|
FileNotFoundError
|
If the configured dataset path is missing. |
ValueError
|
If the configuration is invalid. |
Source code in modosaic/cli/pipeline.py
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 | |
validate_run_config ¶
validate_run_config(config)
Validate dataset paths and numeric runtime options.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
config
|
RunConfig
|
Run configuration to validate. |
required |
Raises:
| Type | Description |
|---|---|
FileNotFoundError
|
If a required dataset path is missing. |
ValueError
|
If a required option is absent or invalid. |
Source code in modosaic/cli/pipeline.py
70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 | |