cars.orchestrator.cluster.mp_cluster.mp_objects
Contains class objects used by multiprocessing cluster
Module Contents
Classes
Encapsulation of multiprocessing job Id (internal use for mp_local_cluster) |
|
Delayed task |
|
multiprocessing version of dask.delayed |
|
Multiprocessing version of distributed.future |
|
iterator on multiprocessing.pool.AsyncResult, similar to as_completed |
|
Object used in FactorisedObject for args already computed |
|
Object used as args of function factorised_func |
Functions
Replace MpDelayed by PreviousData object |
|
|
Replace PreviousData object by real data |
- class cars.orchestrator.cluster.mp_cluster.mp_objects.MpJob(idx, return_index)[source]
Encapsulation of multiprocessing job Id (internal use for mp_local_cluster)
- __slots__ = ['task_id', 'r_idx']
- class cars.orchestrator.cluster.mp_cluster.mp_objects.MpDelayedTask(func, args, kw_args)[source]
Delayed task
- class cars.orchestrator.cluster.mp_cluster.mp_objects.MpDelayed(delayed_task, return_index=0)[source]
multiprocessing version of dask.delayed
- class cars.orchestrator.cluster.mp_cluster.mp_objects.MpFuture(mp_future_task, return_index)[source]
Multiprocessing version of distributed.future
- class cars.orchestrator.cluster.mp_cluster.mp_objects.MpFutureIterator(future_list, cluster, timeout=None)[source]
iterator on multiprocessing.pool.AsyncResult, similar to as_completed Only returns the actual results, delete the future after usage
- class cars.orchestrator.cluster.mp_cluster.mp_objects.PreviousData(delayed)[source]
Object used in FactorisedObject for args already computed in factorized function
- cars.orchestrator.cluster.mp_cluster.mp_objects.transform_mp_delayed_to_previous_data(obj)[source]
Replace MpDelayed by PreviousData object
- Parameters
data – data to replace if necessary
- cars.orchestrator.cluster.mp_cluster.mp_objects.transform_previous_data_to_results(obj, res)[source]
Replace PreviousData object by real data
- Parameters
data – data to replace if necessary
- class cars.orchestrator.cluster.mp_cluster.mp_objects.FactorizedObject(current_task, previous_task)[source]
Object used as args of function factorised_func It contains several tasks that can be run within a single function