cars.orchestrator.cluster.mp_cluster.mp_factorizer
Contains functions needed to factorize delayed
Module Contents
Functions

Factorize Task list 

Factorize Task list 

Compute the number of times every delayed is used in graph 

Get number of time input delayed is used 

Compute the number of times a delayed is used 

Compute the number of different delayed task in list of delayed 

This function unpack multiple functions with their arguments, 
 cars.orchestrator.cluster.mp_cluster.mp_factorizer.factorize_delayed(task_list)
Factorize Task list
Only factorize tasks that depends on a single task
 Parameters
task_list (list(MpDelayed)) – list of delayed
 cars.orchestrator.cluster.mp_cluster.mp_factorizer.factorize_delayed_rec(delayed, graph_usages, already_seen_delayed_tasks)
Factorize Task list
Only factorize tasks that depends on a single task
 Parameters
delayed (MpDelayed) – delayed to factorize
graph_usages (dict example: {delayed1: 3}) – number of usages of delayed
already_seen_delayed_tasks – list of MpDelayedTask already seen
 cars.orchestrator.cluster.mp_cluster.mp_factorizer.compute_graph_delayed_usages(task_list)
Compute the number of times every delayed is used in graph
 Parameters
task_list (list(MpDelayed)) – list of delayed
 Returns
number of usages of delayed
 Return type
dict example: {delayed1: 3}
 cars.orchestrator.cluster.mp_cluster.mp_factorizer.get_delayed_usage_rec(delayed, graph_usages, already_seen_tasks)
Get number of time input delayed is used
 Parameters
delayed (MpDelayed) – delayed to factorize
graph_usages (dict example: {delayed1: 3}) – number of usages of delayed
already_seen_tasks (list[MpDelayedTask]) – list of seen delayed task
 cars.orchestrator.cluster.mp_cluster.mp_factorizer.number_of_usage(delayed, graph_usages)
Compute the number of times a delayed is used
 Parameters
delayed (MpDelayed) – delayed to factorize
graph_usages (dict example: {delayed1: 3}) – number of usages of delayed
 Returns
number of usages of delayed
 Return type
int
 cars.orchestrator.cluster.mp_cluster.mp_factorizer.compute_nb_depending_task(depending_delayed_list)
Compute the number of different delayed task in list of delayed
 Parameters
depending_delayed_list (list[MpDelayed]) – list of delayed
 Returns
number of depending task
 Return type
int
 cars.orchestrator.cluster.mp_cluster.mp_factorizer.factorized_fun(factorized_object)
This function unpack multiple functions with their arguments, and run them sequentialy until task list is empty
 Parameters
factorized_object (mp_objects.FactorizedObject) – Object that contains a list of tasks