multiml.database package
Submodules
Module contents
- class multiml.database.Database
Bases:
object
Base class of Database.
- abstract add_data(data_id, var_name, data, phase)
Add data to database for given data_id, var_name and phase.
If var_name already exists, data need to be appended
- abstract update_data(data_id, var_name, data, phase, index)
Update (replace) data in database for given data_id, var_name, phase and index.
- abstract get_data(data_id, var_name, phase, index)
Get data for given data_id, var_name, phase and index from database.
- abstract delete_data(data_id, var_name, phase)
Delete data for given data_id, var_name and phase from database.
- abstract get_metadata(data_id, phase)
Returns a dictionary of metadata for a given data_id and phase.
- The dict contains: {‘var_name’: {‘type’: type of variable,
‘total_events’: number of samples}
- class multiml.database.ZarrDatabase(output_dir=None, chunk=1000, compressor='default', mode='a')
Bases:
Database
Base class of Zarr database.
- __init__(output_dir=None, chunk=1000, compressor='default', mode='a')
- initialize(data_id)
- add_data(data_id, var_name, idata, phase, mode=None)
Add data to database for given data_id, var_name and phase.
If var_name already exists, data need to be appended
- update_data(data_id, var_name, idata, phase, index, mode=None)
Update (replace) data in database for given data_id, var_name, phase and index.
- get_data(data_id, var_name, phase, index)
Get data for given data_id, var_name, phase and index from database.
- delete_data(data_id, var_name, phase)
Delete data for given data_id, var_name and phase from database.
- create_empty(data_id, var_name, phase, shape, dtype)
- get_metadata(data_id, phase, mode=None)
Returns a dictionary of metadata for a given data_id and phase.
- The dict contains: {‘var_name’: {‘type’: type of variable,
‘total_events’: number of samples}
- get_data_ids()
- class multiml.database.NumpyDatabase
Bases:
Database
Base class of Numpy database.
- __init__()
- initialize(data_id)
- add_data(data_id, var_name, idata, phase, mode=None)
Add data to database for given data_id, var_name and phase.
If var_name already exists, data need to be appended
- update_data(data_id, var_name, idata, phase, index, mode=None)
Update (replace) data in database for given data_id, var_name, phase and index.
- get_data(data_id, var_name, phase, index)
Get data for given data_id, var_name, phase and index from database.
- delete_data(data_id, var_name, phase)
Delete data for given data_id, var_name and phase from database.
- create_empty(data_id, var_name, phase, shape, dtype)
- get_metadata(data_id, phase, mode=None)
Returns a dictionary of metadata for a given data_id and phase.
- The dict contains: {‘var_name’: {‘type’: type of variable,
‘total_events’: number of samples}
- get_data_ids()
- class multiml.database.HybridDatabase(output_dir=None, chunk=1000, compressor='default', mode='a')
Bases:
Database
Base class of Hybrid database.
- __init__(output_dir=None, chunk=1000, compressor='default', mode='a')
- initialize(data_id)
- add_data(data_id, var_name, idata, phase, mode=None)
Add data to database for given data_id, var_name and phase.
If var_name already exists, data need to be appended
- update_data(data_id, var_name, idata, phase, index, mode=None)
Update (replace) data in database for given data_id, var_name, phase and index.
- get_data(data_id, var_name, phase, index)
Get data for given data_id, var_name, phase and index from database.
- delete_data(data_id, var_name, phase)
Delete data for given data_id, var_name and phase from database.
- create_empty(data_id, var_name, phase, shape, dtype, mode=None)
- get_metadata(data_id, phase, mode=None)
Returns a dictionary of metadata for a given data_id and phase.
- The dict contains: {‘var_name’: {‘type’: type of variable,
‘total_events’: number of samples}
- get_data_ids()
- property mode