curl -sfL https://get.k3ai.in | bash -s -- --cpu --plugin_kfp_sdkcurl -sfL https://get.k3ai.in | bash -s -- --cpu --pipelines --plugin_jupyter-minimalcurl -sfL https://get.k3ai.in | bash -s -- --wsl --pipelines --plugin_jupyter-minimalcurl -sfL https://get.k3ai.in | bash -s -- --skipk3s --plugin_jupyter-minimalk3s kubectl get service/traefik -o jsonpath='{.status.loadBalancer.ingress[0].ip}' -n kube-systemimport kfp
import json
# 'host' is your Kubeflow Pipelines API server's host address.
host="http://<K3AI IP>/"
# 'pipeline_name' is the name of the pipeline you want to list. We provide you
# here a pre-set name to test immediately
pipeline_name = "[Demo] TFX - Iris classification pipeline"
client = kfp.Client(host)
# To filter on pipeline name, you can use a predicate indicating that the pipeline
# name is equal to the given name.
# A predicate includes 'key', 'op' and 'string_value' fields.
# The 'key' specifies the property you want to apply the filter to. For example,
# if you want to filter on the pipeline name, then 'key' is set to 'name' as
# shown below.
# The 'op' specifies the operator used in a predicate. The operator can be
# EQUALS, NOT_EQUALS, GREATER_THAN, etc. The complete list is at [filter.proto](https://github.com/kubeflow/pipelines/blob/master/backend/api/filter.proto#L32)
# When using the operator in a string-typed predicate, you need to use the
# corresponding integer value of the enum. For Example, you can use the integer
# value 1 to indicate EQUALS as shown below.
# The 'string_value' specifies the value you want to filter with.
filter = json.dumps({'predicates': [{'key': 'name', 'op': 1, 'string_value': '{}'.format(pipeline_name)}]})
pipelines = client.pipelines.list_pipelines(filter=filter)
# The pipeline with the given pipeline_name, if exists, is in pipelines.pipelines[0].
print (pipelines)python demo.pyIP=$(kubectl get service/traefik -o jsonpath='{.status.loadBalancer.ingress[0].ip}' -n kube-system) \
&& echo "http://"$IP":8888"import kfp
import json
# 'host' is your Kubeflow Pipelines API server's host address.
host="http://ml-pipeline-ui.kubeflow/"
# 'pipeline_name' is the name of the pipeline you want to list. We provide you
# here a pre-set name to test immediately
pipeline_name = "[Demo] TFX - Iris classification pipeline"
client = kfp.Client(host)
# To filter on pipeline name, you can use a predicate indicating that the pipeline
# name is equal to the given name.
# A predicate includes 'key', 'op' and 'string_value' fields.
# The 'key' specifies the property you want to apply the filter to. For example,
# if you want to filter on the pipeline name, then 'key' is set to 'name' as
# shown below.
# The 'op' specifies the operator used in a predicate. The operator can be
# EQUALS, NOT_EQUALS, GREATER_THAN, etc. The complete list is at [filter.proto](https://github.com/kubeflow/pipelines/blob/master/backend/api/filter.proto#L32)
# When using the operator in a string-typed predicate, you need to use the
# corresponding integer value of the enum. For Example, you can use the integer
# value 1 to indicate EQUALS as shown below.
# The 'string_value' specifies the value you want to filter with.
filter = json.dumps({'predicates': [{'key': 'name', 'op': 1, 'string_value': '{}'.format(pipeline_name)}]})
pipelines = client.pipelines.list_pipelines(filter=filter)
# The pipeline with the given pipeline_name, if exists, is in pipelines.pipelines[0].
print (pipelines){'next_page_token': None,
'pipelines': [{'created_at': datetime.datetime(2020, 10, 14, 13, 27, 18, tzinfo=tzlocal()),
'default_version': {'code_source_url': None,
'created_at': datetime.datetime(2020, 10, 14, 13, 27, 18, tzinfo=tzlocal()),
'id': '8a53981e-7c3e-4897-8c75-26f710c20f7a',
'name': '[Demo] TFX - Iris classification '
'pipeline',
'package_url': None,
'parameters': [{'name': 'pipeline-root',
'value': 'gs://{{kfp-default-bucket}}/tfx_iris/{{workflow.uid}}'},
{'name': 'data-root',
'value': 'gs://ml-pipeline/sample-data/iris/data'},
{'name': 'module-file',
'value': '/tfx-src/tfx/examples/iris/iris_utils_native_keras.py'}],
'resource_references': [{'key': {'id': '8a53981e-7c3e-4897-8c75-26f710c20f7a',
'type': 'PIPELINE'},
'name': None,
'relationship': 'OWNER'}]},
'description': '[source '
'code](https://github.com/kubeflow/pipelines/tree/c84f4da0f7b534e1884f6696f161dc1375206ec2/samples/core/iris). '
'Example pipeline that classifies Iris flower '
'subspecies and how to use native Keras within '
'TFX.',
'error': None,
'id': '8a53981e-7c3e-4897-8c75-26f710c20f7a',
'name': '[Demo] TFX - Iris classification pipeline',
'parameters': [{'name': 'pipeline-root',
'value': 'gs://{{kfp-default-bucket}}/tfx_iris/{{workflow.uid}}'},
{'name': 'data-root',
'value': 'gs://ml-pipeline/sample-data/iris/data'},
{'name': 'module-file',
'value': '/tfx-src/tfx/examples/iris/iris_utils_native_keras.py'}],
'url': None}],
'total_size': 1}