npu.pipeline.sequential_pipeline
Classes
|
- class npu.pipeline.sequential_pipeline.SequentialPipeline(**kwargs)
- Author:
Alberto M. Esmoris Pena
Sequential pipeline (no loops, no recursion). See
Pipeline.- __init__(**kwargs)
Initialize an instance of SequentialPipeline. A sequential pipeline execute the different components in the order they are given. See parent
Pipeline- Parameters:
kwargs – The attributes for the SequentialPipeline
- Variables:
sequence (list) – The sequence of components defining the SequentialPipeline.
- input_output_hatch()
This method can be used to handle delayed hatches. Hatching a component consists of computing delayed initialization logic that often requires previous initialization. By default, it is not necessary. Pipelines that need to provide this behavior must override this method to provide their logic.
- Returns:
Nothing at all, but the internal state of the member attributes might be updated.
- run_case(input, output=None, LOGGER=None)
Run the sequential pipeline for a particular input.
- Parameters:
input – The input for this particular case.
output – Optionally, the output path or prefix.
LOGGER – The LOGGER, if any, to report the runtime. Note that when not given, it will be taken automatically from the imported framework (e.g., VL3D or DOCI).
- Returns:
Nothing.
- populate_sequence()
Populate the sequence of components defining the sequential pipeline. Note that any concrete sequential pipeline implementation must provide the logic for this method.
- Returns:
Nothing at all, but the self.sequence list is updated to contain the many specified components.
- build_executor(input, output)
Build the pipeline’s executor to run a case. Note that any concrete sequential pipeline implementation must provide the logic for this method.
See
SequentialPipeline.run_case().- Returns:
The built pipeline’s executor.
- pre_run_case(input, output)
This method can be overridden to provide additional logic that must be run before running the current case logic.
See
SequentialPipeline.run_case().- Returns:
Nothing at all.
- post_run_case(input, output)
This method can be overridden to provide additional logic that must be run after running the current case logic.
See
SequentialPipeline.run_case().- Returns:
Nothing at all.