cars.orchestrator.cluster.mp_cluster.mp_tools
Contains tools for multiprocessing
Functions
|
Replace MpJob in list or dict by their real data |
|
Replace MpJob in list or dict by their real data recursively |
Module Contents
- cars.orchestrator.cluster.mp_cluster.mp_tools.replace_data(list_or_dict, func_to_apply, *func_args)[source]
Replace MpJob in list or dict by their real data (can deal with FactorizedObject)
- Parameters:
list_or_dict – list or dict of data or mp_objects.FactorizedObject
func_to_apply – function to apply
func_args – function arguments
- Returns:
list or dict with real data
- Return type:
list, tuple, dict, mp_objects.FactorizedObject
- cars.orchestrator.cluster.mp_cluster.mp_tools.replace_data_rec(list_or_dict, func_to_apply, *func_args)[source]
Replace MpJob in list or dict by their real data recursively
- Parameters:
list_or_dict – list or dict of data
func_to_apply – function to apply
func_args – function arguments
- Returns:
list or dict with real data
- Return type:
list, tuple, dict