파이프라인 내 컴포넌트 연결 관계 제거

파이프라인에 추가된 컴포넌트들 사이의 부모 자식 관계를 제거합니다. 부모 자식 관계로 정의되어 있는 parent_idchild_id 정보를 입력하여 해당 연결 관계를 제거합니다.

pipeline.remove_edge(parent_id="str", child_id="str")
  • Parameters
    • parent_id(str): 부모 컴포넌트의 ID
    • child_id(str): 자식 컴포넌트의 ID
  • Troubleshooting
    • RuntimeError: The edge does not exist in the pipeline.
      • 해당 edge가 파이프라인에 존재하지 않을 때 발생합니다.

Example

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

# 코드 셀
code1 = """
x = 1
"""
code2 = """
y = 1
z = 1
"""

if __name__ == "__main__":
    # 파이프라인 객체 생성
    pipeline = LinkPipeline()

    # 컴포넌트 생성
    component1 = create_link_component(identifier="111-1", name="test1", code=code1)
    component2 = create_link_component(identifier="111-2", name="test2", code=code2)

    # 파이프라인에 컴포넌트 추가
    pipeline.add_component(component=component1)
    pipeline.add_component(component=component2)

    # 파이프라인 내 컴포넌트 연결 관계 추가
    pipeline.add_edge(parent_id="111-1", child_id="111-2")

    # 컴포넌트 연결 관계 제거
    pipeline.remove_edge(parent_id="111-1", child_id="111-2")