---
agentTools:
  projectIndex: https://makinarocks-link.readme.io/v1.1.0-Kor/llms.txt
---

# load_link_pipeline_from_kfp

`load_link_pipeline_from_kfp`은 `LinkPipeline` 클래스를 생성하여, Link에서 생성된 Kubeflow `yaml` 파일에서의 파이프라인 객체를 불러오는 메소드입니다.

### Kubeflow `yaml` 파일에서의 파이프라인 객체 불러오기

Link에서 생성된 Kubeflow `yaml` 파일에서의 파이프라인 객체를 불러옵니다.

```
load_link_pipeline_from_kfp(file: str = "") -> LinkPipeline
```

* **Parameters**
  * `file`(str): 불러오고자 하는 `yaml` 파일의 경로 및 이름
* **Returns**
  * `LinkPipeline`
* **Troubleshooting**
  * *FileNotFoundError: No such file or directory: '{file.yaml}'*
    * `file`이라는 이름의 `yaml` 파일이 존재하지 않을 경우 발생합니다.
  * *ValueError: The file should be `yaml` file with a Link pipeline*
    * 입력한 파일이 `yaml` 형식이지만 Link에서 생성된 파이프라인 정보가 해당 파일에 없을 경우 발생합니다.

### Example

1. Sample Source `yaml` 파일을 다운로드 받습니다.
   * [sample.yaml](https://docs.google.com/uc?export=download\&id=1gzp8Xj1UTGZ-Sn4aHR47yk3JF9OsXiix)
2. 해당 `yaml` 파일에서의 파이프라인 객체를 불러옵니다.

   ```Text Python
   from mrx_link.sdk.utils import *

   if __name__ == "__main__":
   	pipeline = load_link_pipeline_from_kfp(file="sample.yaml")
   ```