Add components to the pipeline

πŸ“˜

In order to create a component, use the create_link_component method. (here)

Add the component you created as a pipeline components.

pipeline.add_component(component=component1)
  • Parameters
    • component(Object): Components created by calling the create_link_component method
  • Troubleshooting
    • RuntimeError: The component name has already been used in the pipeline.
      • This occurs when a component with the same name as an existing component is added to the pipeline.

Example

from mrx_link.sdk import LinkPipeline
from mrx_link.sdk.utils import create_link_component

# Code cell
code1 = """
x = 1
"""

if __name__ == "__main__":
    # Create pipeline object
    pipeline = LinkPipeline()

    # Create a component and add it to the pipeline
    component1 = create_link_component(identifier="111-1", name="test1", code=code1)
    pipeline.add_component(component=component1)