cars.orchestrator.cluster.mp_cluster.mp_wrapper
Contains functions for wrapper disk
Module Contents
Classes
AbstractWrapper |
|
AbstractWrapper |
|
WrapperDisk |
Functions
|
Remove directory from disk |
|
Create a wrapper for functionn running it |
|
Create a wrapper for function |
|
Load args or kwargs from disk to memory |
|
Check if a given object is dumped |
|
Load object from disk |
|
Load shared object from disk |
|
Dump object to disk |
|
Create path where to dump object |
|
Dump results to tmp_dir, according to ids |
Attributes
- cars.orchestrator.cluster.mp_cluster.mp_wrapper.DENSE_NAME = 'DenseDO'
- cars.orchestrator.cluster.mp_cluster.mp_wrapper.SPARSE_NAME = 'SparseDO'
- cars.orchestrator.cluster.mp_cluster.mp_wrapper.DICT_NAME = 'DictDO'
- cars.orchestrator.cluster.mp_cluster.mp_wrapper.SHARED_NAME = 'SharedDO'
- class cars.orchestrator.cluster.mp_cluster.mp_wrapper.AbstractWrapper[source]
AbstractWrapper
- class cars.orchestrator.cluster.mp_cluster.mp_wrapper.WrapperNone(tmp_dir)[source]
Bases:
AbstractWrapper
AbstractWrapper
- class cars.orchestrator.cluster.mp_cluster.mp_wrapper.WrapperDisk(tmp_dir)[source]
Bases:
AbstractWrapper
WrapperDisk
- cleanup(keep_shared_dir=False)[source]
Cleanup tmp_dir :param keep_shared_dir: do not clean directory of shared objects
- cleanup_future_res(future_res)[source]
Cleanup future result
- Parameters
future_res – future result to clean
- cars.orchestrator.cluster.mp_cluster.mp_wrapper.removing_disk_data(path)[source]
Remove directory from disk
- Parameters
path – path to delete
- cars.orchestrator.cluster.mp_cluster.mp_wrapper.none_wrapper_fun(*argv, **kwargs)[source]
Create a wrapper for functionn running it
- Parameters
argv – args of func
kwargs – kwargs of func
- Returns
path to results
- cars.orchestrator.cluster.mp_cluster.mp_wrapper.disk_wrapper_fun(*argv, **kwargs)[source]
Create a wrapper for function
- Parameters
argv – args of func
kwargs – kwargs of func
- Returns
path to results
- cars.orchestrator.cluster.mp_cluster.mp_wrapper.load_args_or_kwargs(args_or_kwargs)[source]
Load args or kwargs from disk to memory
- Parameters
args_or_kwargs – args or kwargs of func
- Returns
new args
- cars.orchestrator.cluster.mp_cluster.mp_wrapper.is_dumped_object(obj)[source]
Check if a given object is dumped
- Parameters
obj – object
- Returns
is dumped
- Return type
bool
- cars.orchestrator.cluster.mp_cluster.mp_wrapper.load(path)[source]
Load object from disk
- Parameters
path (str) – path
- Returns
object
Load shared object from disk
- Parameters
path (str) – path
- Returns
object
- cars.orchestrator.cluster.mp_cluster.mp_wrapper.dump_single_object(obj, path)[source]
Dump object to disk
- Parameters
path (str) – path