Skip to content

Commit

Permalink
Added a sample pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
Ark-kun committed May 20, 2021
1 parent d0e14a1 commit 49b544a
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions components/datasets/HuggingFace/_samples/sample.pipeline.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
from kfp import components
from kfp import dsl


load_dataset_op = components.load_component_from_url('https://raw.githubusercontent.com/kubeflow/pipelines/d0e14a1dad4b851ad2a60a0c1a8201493f3d931c/components/datasets/HuggingFace/Load_dataset/component.yaml')
split_dataset_op = components.load_component_from_url('https://raw.githubusercontent.com/kubeflow/pipelines/d0e14a1dad4b851ad2a60a0c1a8201493f3d931c/components/datasets/HuggingFace/Split_dataset/component.yaml')


def huggingface_pipeline():
dataset_dict_task = load_dataset_op(dataset_name='imdb')
with dsl.ParallelFor(dataset_dict_task.outputs['splits']) as split_name:
deataset_task = split_dataset_op(
dataset_dict=dataset_dict_task.outputs['dataset_dict'],
split_name=split_name,
)


if __name__ == '__main__':
import kfp
kfp_endpoint = None
kfp.Client(host=kfp_endpoint).create_run_from_pipeline_func(
huggingface_pipeline,
arguments={}
)

0 comments on commit 49b544a

Please sign in to comment.