SDK Reference
Log In
SDK Reference

Remove an edge in the pipeline

Remove parent-child relationships between pipeline components. To remove the edge, enter the parent_id and child_id information defined as a parent-child relationship.

pipeline.remove_edge(parent_id="str", child_id="str")
  • Parameters
    • parent_id(str): ID of the parent component
    • child_id(str): ID of the child component
  • Troubleshooting
    • RuntimeError: The edge does not exist in the pipeline.
      • This occurs when the pipeline does not contain the edge.

Example

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

# Code cell
code1 = """
x = 1
"""
code2 = """
y = 1
z = 1
"""

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

    # Create components
    component1 = create_link_component(identifier="111-1", name="test1", code=code1)
    component2 = create_link_component(identifier="111-2", name="test2", code=code2)

    # Add components to the pipeline
    pipeline.add_component(component=component1)
    pipeline.add_component(component=component2)

    # Add an edge
    pipeline.add_edge(parent_id="111-1", child_id="111-2")

    # Remove an edge
    pipeline.remove_edge(parent_id="111-1", child_id="111-2")