profit.run.worker
proFit worker class & components
Module Contents
Classes
Helper class that provides a standard way to create an ABC using |
Functions
|
entry point to run a worker |
- class profit.run.worker.Worker(run_id: int, *, interface: profit.run.interface.WorkerInterface = 'memmap', debug=False, log_path='log', logger=None)[source]
Bases:
profit.util.component.Component
Helper class that provides a standard way to create an ABC using inheritance.
- classmethod wrap(label, outputs=None, inputs=None)[source]
``` @Worker.wrap(‘label’, [‘f’, ‘g’], [‘x’, ‘y’]) def func(x, y):
…
@Worker.wrap(‘label’, [‘f’, ‘g’]) def func(x, y):
…
@Worker.wrap(‘label’) def func(x, y) -> [‘f’, ‘g’]:
…
@Worker.wrap(‘name’, ‘f’, ‘x’) def func(x):
…
@Worker.wrap(‘name’) def func(x) -> ‘f’:
…
@Worker.wrap(‘name’) def f(x):
…