kaishi.core.pipeline

Class definition for a pipeline object.

Module Contents

class kaishi.core.pipeline.Pipeline

Base class for a generic pipeline object.

__call__(self, dataset, verbose: bool = False)

Run the full pipeline as configured.

Parameters
  • dataset (initiailized kaishi dataset class (e.g. :class kaishi.image.dataset.Dataset)) – dataset to perform pipeline operations on

  • verbose (bool) – flag to indicate verbosity

__repr__(self)

Print pipeline overview.

__str__(self)
_get_configs_for_component(self, initialized_component)

Get args and values of them from an initialized component.

Parameters

initialized_component (initialized pipeline component (has to inherit from kaishi.core.pipeline_component.PipelineComponent)) – pipeline to get configurable arguments for

Returns

dictionary with argument name keys and their values as contents

Return type

dict

add_component(self, component)

Add a method to be called as a pipeline step.

Parameters

component – component to add to the pipeline

remove_component(self, index)

Remove a pipeline method by index.

Parameters

index (int) – index to remove

reset(self)

Reset the pipeline by removing all components.