iris.callbacks package¶
Submodules¶
iris.callbacks.callback_interface module¶
iris.callbacks.pipeline_trace module¶
- class iris.callbacks.pipeline_trace.NodeResultsWriter(trace_storage_reference: PipelineCallTraceStorage, result_name: str)[source]¶
Bases:
Callback
A node call results writer Callback class.
- class iris.callbacks.pipeline_trace.PipelineCallTraceStorage(results_names: Iterable[str])[source]¶
Bases:
object
A storage object for pipeline input, intermediate and final results.
- ERROR_KEY_NAME = 'error'¶
- INPUT_KEY_NAME = 'input'¶
- get(result_name: str) Any [source]¶
Get result_name result.
- Parameters:
result_name (str) – Result name.
- Raises:
PipelineCallTraceStorageError – Raised if result_name is not found.
- Returns:
Result object.
- Return type:
Any
- get_error() Exception | None [source]¶
Return stored error.
- Returns:
error.
- Return type:
Optional[Exception]
- static initialise(nodes: Dict[str, Algorithm], pipeline_nodes: List[PipelineNode]) PipelineCallTraceStorage [source]¶
Instantiate mechanisms for intermediate results tracing.
- Parameters:
nodes (Dict[str, Algorithm]) – Mapping between nodes names and the corresponding instanciated nodes.
pipeline_nodes (List[PipelineNode]) – List of nodes as declared in the input config. Not used in this function.
- Returns:
Pipeline intermediate and final results storage.
- Return type:
- write(result_name: str, result: Any) None [source]¶
Write a result to a storage saved under the name result_name.
- Parameters:
result_name (str) – Result name.
result (Any) – Result reference to save.