boxkit.library._execute module

Module with implementation of ExecuteTask utility

boxkit.library._execute.exectask(action, obj_list, *args, **kwargs)
Parameters
  • action (action object contains following attributes) –

    targetfunction/action operates on a,

    parallel_obj —> def target(parallel_obj, args)

    actual call passes, obj_list —> target(obj_list, args)

    nthreads : number of nthreads (only relevant for parallel operations) monitor : flag (True or False) to show progress bar for action backend : ‘serial’, ‘loky’, ‘dask’

  • obj_list (list of parallel_objs) –

  • args (tuple of additional arguments) –

boxkit.library._execute.execute_cbox(action, obj_list, *args, **kwargs)

Wrapper takes in obj_list and additional arguments and then applies target operations to individual parallel_objs using boxlib

boxkit.library._execute.execute_dask(action, obj_list, *args, **kwargs)

Wrapper takes in obj_list and additional arguments and then applies target operations to individual parallel_objs in using dask parallel backend

nthreads = 1 or None reverts to serial mode

boxkit.library._execute.execute_loky(action, obj_list, *args, **kwargs)

Wrapper takes in obj_list and additional arguments and then applies target operations to individual parallel_objs in parallel using joblib “loky” backend

nthreads = 1 or None reverts to serial mode

boxkit.library._execute.execute_serial(action, obj_list, *args, **kwargs)

Wrapper takes in obj_list and additional arguments and then applies target operations to individual parallel_objs in serial