matensemble.strategy module

class matensemble.strategy.FutureProcessingStrategy(manager)[source]

Bases: ABC

The Base Class that all FutureProcessingStrategy’s must extend in order to be compliant with how the FluxManager uses them

__init__(manager)[source]
Return type:

None

abstractmethod process_futures(buffer_time)[source]

Must be implemented by the child classes

Return type:

None

class matensemble.strategy.AdaptiveStrategy(manager)[source]

Bases: FutureProcessingStrategy

An implementation of the FutureProcessingStrategy which will adaptively submit new Chore’s as incoming chores are completed.

__init__(manager)[source]

AdaptiveStrategy constructor

Parameters:

manager (FluxManager) – The FluxManager that holds all of the queues and functions to handle them.

Return type:

None

process_futures(buffer_time)[source]

Process the future objects as Chore’s complete

Parameters:

buffer_time (float) – The amount of time to wait between chores being completed.

Return type:

None

class matensemble.strategy.NonAdaptiveStrategy(manager)[source]

Bases: FutureProcessingStrategy

An implementation of the FutureProcessingStrategy which will not adaptively submit new Chore’s as incoming chores are completed.

__init__(manager)[source]
Return type:

None

process_futures(buffer_time)[source]

Must be implemented by the child classes

Return type:

None

class matensemble.strategy.UserStrategy(manager, pipeline, processing_chore, bolo_list)[source]

Bases: FutureProcessingStrategy

__init__(manager, pipeline, processing_chore, bolo_list)[source]
Return type:

None

process_futures(buffer_time)[source]

Must be implemented by the child classes

Return type:

None

matensemble.strategy.append_text(path, text)[source]

Append some text to the end of a given file. Used for writing error messages to stderr on a specific chore

Parameters:
  • path (Path) – The path to the file to write to

  • text (str) – The text to append to the file

Return type:

None