Search documentation
karat

+

K

User Documentation ↗

transforms.api.Pipeline

class transforms.api.Pipeline

An object for grouping a collection of Transform objects.

add_transforms(*transforms)

Register the given Transform objects to the pipeline instance.

  • Parameters: *transforms (Transform) – The transforms to register.
  • Raises:
    • ValueError – If multiple Transform objects write to the same Output alias.
    • ValueError – If multiple Transform objects have the same compute function reference.

discover_transforms(*modules)

Recursively find and import modules, registering every module-level transform.

This method recursively finds and imports modules starting at the given module’s __path__. Each module found is imported and any attribute that is an instance of Transform as constructed by the transforms decorators will be registered to the pipeline.

Copied!
1 2 3 >>> import myproject >>> p = Pipeline() >>> p.discover_transforms(myproject)
  • Parameters: *modules (module) – The modules to start searching from.

Each module found is imported. Try to avoid executing code at the module-level.

property transforms

The list of transforms registered to the pipeline.