preprocess
canari_ml.hydra.preprocess
¶
canari_ml.hydra.preprocess.logger = logging.getLogger(__name__)
module-attribute
¶
canari_ml.hydra.preprocess.get_date_splits(cfg)
¶
Get the start and end dates for training, validation, and testing splits based on the configuration.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
cfg
|
DictConfig
|
Hydra preprocess configuration object. |
required |
Returns:
| Type | Description |
|---|---|
IterableNamespace
|
An iterable namespace with split information. |
Source code in src/canari_ml/hydra/preprocess.py
canari_ml.hydra.preprocess.reproject(cfg)
¶
Reproject data using the specified configuration file.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
cfg
|
DictConfig
|
Hydra preprocess configuration object. |
required |
Source code in src/canari_ml/hydra/preprocess.py
canari_ml.hydra.preprocess.preprocess_era5(cfg)
¶
Preprocess ERA-5 data using the specified configuration file.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
cfg
|
DictConfig
|
Hydra preprocess configuration object. |
required |
Source code in src/canari_ml/hydra/preprocess.py
129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 | |
canari_ml.hydra.preprocess.preprocess_loader_init(cfg)
¶
Initialise the data loader configuration file.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
cfg
|
DictConfig
|
Hydra preprocess configuration object. |
required |
Source code in src/canari_ml/hydra/preprocess.py
canari_ml.hydra.preprocess.preprocess_loader_add_era5(cfg)
¶
Add ERA5 data to the preprocessor configuration.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
cfg
|
DictConfig
|
Hydra preprocess configuration object. |
required |
Source code in src/canari_ml/hydra/preprocess.py
canari_ml.hydra.preprocess.preprocess_loader_add_mask(cfg)
¶
Add mask data to the preprocessor configuration.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
cfg
|
DictConfig
|
Hydra preprocess configuration object. |
required |
Source code in src/canari_ml/hydra/preprocess.py
canari_ml.hydra.preprocess.preprocess_cache(cfg)
¶
Generate ML dataset cache & config (if train) or just config file (if predict).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
cfg
|
DictConfig
|
Hydra preprocess configuration object. |
required |
Source code in src/canari_ml/hydra/preprocess.py
canari_ml.hydra.preprocess.preprocess_run(cfg)
¶
Run preprocessing steps for train/predict from HYDRA config.
This function loads a Hydra configuration, and preprocesses the data.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
cfg
|
DictConfig
|
Hydra auto-loaded configuration. |
required |
Source code in src/canari_ml/hydra/preprocess.py
canari_ml.hydra.preprocess.main(preprocess_type='train')
¶
Entry point to configure and run the preprocessing pipeline.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
preprocess_type
|
str
|
Type of preprocessing, either "train" or "predict". |
'train'
|