cars.orchestrator.registry.saver_registry
This module contains the saver registry class
Module Contents
Classes
CarsDatasetsRegistrySaver |
|
SingleCarsDatasetSaver |
- class cars.orchestrator.registry.saver_registry.CarsDatasetsRegistrySaver(id_generator)[source]
Bases:
cars.orchestrator.registry.abstract_registry.AbstractCarsDatasetRegistry
CarsDatasetsRegistrySaver This registry manages the saving of arriving future results
- get_cars_ds(future_result)[source]
Get a list of registered CarsDataset
- Parameters
obj – object to get cars dataset from
:return corresponding CarsDataset :rtype: CarsDataset
- get_cars_datasets_list()[source]
Get a list of registered CarsDataset
:return list of CarsDataset :rtype: list(CarsDataset)
- cars_dataset_in_registry(cars_ds)[source]
Check if a CarsDataset is already registered, return id if exists
- Parameters
cars_ds (CarsDataset) – cars dataset
:return : True if in registry, if of cars dataset :rtype : Tuple(bool, int)
- get_cars_ds_saver_corresponding_cars_dataset(cars_ds)[source]
Get the SingleCarsDatasetSaver corresponding to given cars dataset
- Parameters
cars_ds – cars dataset
:return : single cars dataset saver :rtype : SingleCarsDatasetSaver
- get_cars_ds_saver_corresponding_id(obj_id)[source]
Get the SingleCarsDatasetSaver corresponding to given id
- Parameters
obj_id (int) – cars dataset id
:return : single cars dataset saver :rtype : SingleCarsDatasetSaver
- save(future_result)[source]
Save future result
- Parameters
future_result – xr.Dataset or pd.DataFrame
- add_file_to_save(file_name, cars_ds, tag=None, dtype=None, nodata=None, optional_data=False, save_by_pair=False)[source]
Add file corresponding to cars_dataset to registered_cars_datasets
- Parameters
file_name (str) – file name to save futures to
cars_ds (CarsDataset) – CarsDataset to register
tag (str) – tag to save
dtype (str) – dtype
nodata (float) – no data value
optional_data (bool) – True if the data is optionnal
save_by_pair (bool) –
- class cars.orchestrator.registry.saver_registry.SingleCarsDatasetSaver(obj_id, cars_ds)[source]
SingleCarsDatasetSaver
Structure managing the descriptors of each CarsDataset.
- add_file(file_name, tag=None, dtype=None, nodata=None, optional_data=False, save_by_pair=False)[source]
Add file to current CarsDatasetSaver
- Parameters
file_name (str) – file name to save futures to
tag (str) – tag to save
dtype (str) – dtype
nodata (float) – no data value
optional_data (bool) – True if the data is optionnal
- save(future_result)[source]
Save future result
- Parameters
future_result – xr.Dataset or pandas.DataFrame