Skip to content

Commit

Permalink
Removed the usage of the ComponentStore
Browse files Browse the repository at this point in the history
Now the samples are invalid until they're merged to master, but Hongye asked for that.
  • Loading branch information
Ark-kun committed Apr 4, 2019
1 parent dd55d25 commit a3fba17
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 17 deletions.
14 changes: 5 additions & 9 deletions samples/kubeflow-tf/kubeflow-training-classification.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,12 @@
import kfp.dsl as dsl
import kfp.gcp as gcp

from kfp.components import ComponentStore
from kfp import components

cs = ComponentStore()
cs.url_search_prefixes.append('https://raw.githubusercontent.com/kubeflow/pipelines/master/components/')
cs.url_search_prefixes.append('https://raw.githubusercontent.com/Ark-kun/pipelines/Added-component-definitions-to-our-components/components/')

dataflow_tf_transform_op = cs.load_component('dataflow/tft')
kubeflow_tf_training_op = cs.load_component('kubeflow/dnntrainer')
dataflow_tf_predict_op = cs.load_component('dataflow/predict')
confusion_matrix_op = cs.load_component('local/confusion_matrix')
dataflow_tf_transform_op = components.load_component_from_url('https://raw.githubusercontent.com/kubeflow/pipelines/master/components/dataflow/tft/component.yaml')
kubeflow_tf_training_op = components.load_component_from_url('https://raw.githubusercontent.com/kubeflow/pipelines/master/components/kubeflow/dnntrainer/component.yaml')
dataflow_tf_predict_op = components.load_component_from_url('https://raw.githubusercontent.com/kubeflow/pipelines/master/components/dataflow/predict/component.yaml')
confusion_matrix_op = components.load_component_from_url('https://raw.githubusercontent.com/kubeflow/pipelines/master/components/local/confusion_matrix/component.yaml')

@dsl.pipeline(
name='Pipeline TFJob',
Expand Down
11 changes: 3 additions & 8 deletions samples/xgboost-spark/xgboost-training-cm.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,10 @@
import kfp.dsl as dsl
import kfp.gcp as gcp

from kfp.components import ComponentStore

cs = ComponentStore()
cs.url_search_prefixes.append('https://raw.githubusercontent.com/kubeflow/pipelines/master/components/')
cs.url_search_prefixes.append('https://raw.githubusercontent.com/Ark-kun/pipelines/Added-component-definitions-to-our-components/components/')

confusion_matrix_op = cs.load_component('local/confusion_matrix')
roc_op = cs.load_component('local/roc')
from kfp import components

confusion_matrix_op = components.load_component_from_url('https://raw.githubusercontent.com/kubeflow/pipelines/master/components/local/confusion_matrix/component.yaml')
roc_op = components.load_component_from_url('https://raw.githubusercontent.com/kubeflow/pipelines/master/components/local/roc/component.yaml')

# ================================================================
# The following classes should be provided by components provider.
Expand Down

0 comments on commit a3fba17

Please sign in to comment.