profit.run.runner

Runner & Runner Interface

Module Contents

Classes

Runner

Helper class that provides a standard way to create an ABC using

class profit.run.runner.Runner(*, interface: profit.run.interface.RunnerInterface = 'memmap', worker: Mapping = 'command', work_dir='.', debug=False, parallel=0, sleep=0.1, logfile='runner.log', logger=None)[source]

Bases: profit.util.component.Component

Helper class that provides a standard way to create an ABC using inheritance.

property config
property input_data
property output_data
property flat_output_data
classmethod from_config(run_config, base_config)[source]

Constructor from run config & base config dict

__repr__()[source]

Return repr(self).

change_work_dir()[source]
fill(params_array, offset=0)[source]

fill Interface input with parameters

fill_output(named_output, offset=0)[source]

fill Interface output with values

abstract spawn(params=None, wait=False)[source]

spawn a single run

Parameters:
  • params – a mapping which defines input parameters to be set

  • wait – whether to wait for the run to complete

spawn_array(params_array, wait=False, progress=False)[source]

spawn an array of runs

maximum ‘parallel’ at the same time blocking until all are submitted

abstract poll(run_id)[source]

check the status of the run directly

poll_all()[source]
check_runs()[source]

check the status of runs via the interface

abstract cancel(run_id)[source]
cancel_all()[source]
wait(run_id)[source]
wait_all(progress=False)[source]
clean()[source]