Python class
PipelinesFactory
PipelinesFactory
max.interfaces.PipelinesFactory
Type alias for factory functions that create pipeline instances.
Factory functions should return a Pipeline with properly typed inputs and outputs that are bound to the PipelineInputs and PipelineOutput base classes respectively. This ensures type safety while maintaining flexibility for different pipeline implementations.
Example:
- def create_text_pipeline() -> Pipeline[TextGenerationInputs, TextGenerationOutput]:
- return MyTextGenerationPipeline()
factory: PipelinesFactory = create_text_pipeline
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!