SDK Reference
Log In
SDK Reference

Remove a component from the pipeline

pipeline.remove_component(component_id="str")
  • Parameters
    • component_id(str): ID of the component to remove
  • Troubleshooting
    • RuntimeError: There is no component_id {component_id} in the pipeline.
      • This occurs when there is no component with the component_id.

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)

    # Remove pipeline component
    pipeline.remove_component(component_id="111-1")