From deb4d0ed41662055031832f4ba03e324dd609143 Mon Sep 17 00:00:00 2001 From: Alexey Volkov Date: Fri, 5 Apr 2019 17:10:57 -0700 Subject: [PATCH 1/3] Fixed bug in ROC component definition --- components/local/roc/component.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/local/roc/component.yaml b/components/local/roc/component.yaml index 7ba64ddb885..605af5bcda1 100644 --- a/components/local/roc/component.yaml +++ b/components/local/roc/component.yaml @@ -12,7 +12,7 @@ inputs: implementation: container: image: gcr.io/ml-pipeline/ml-pipeline-local-confusion-matrix:a277f87ea1d4707bf860d080d06639b7caf9a1cf - command: [python2, /ml/confusion_matrix.py] + command: [python2, /ml/roc.py] args: [ --predictions, {inputValue: Predictions dir}, --trueclass, {inputValue: True class}, From 8177505944fb58d9d880b40a6c9109a6ab96e5c8 Mon Sep 17 00:00:00 2001 From: Alexey Volkov Date: Fri, 5 Apr 2019 17:21:09 -0700 Subject: [PATCH 2/3] Fixed the XGBoost sample --- samples/xgboost-spark/xgboost-training-cm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/xgboost-spark/xgboost-training-cm.py b/samples/xgboost-spark/xgboost-training-cm.py index 63d2a9d0943..ca5ab546819 100755 --- a/samples/xgboost-spark/xgboost-training-cm.py +++ b/samples/xgboost-spark/xgboost-training-cm.py @@ -20,7 +20,7 @@ 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') +roc_op = components.load_component_from_url('https://raw.githubusercontent.com/kubeflow/pipelines/deb4d0ed41662055031832f4ba03e324dd609143/components/local/roc/component.yaml') # ================================================================ # The following classes should be provided by components provider. From 9d3ae42eff32e519ba54c47b9d761a9a96e9e363 Mon Sep 17 00:00:00 2001 From: Alexey Volkov Date: Fri, 5 Apr 2019 18:49:20 -0700 Subject: [PATCH 3/3] Fixed the ROC op usage in XGBoost sample --- samples/xgboost-spark/xgboost-training-cm.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/samples/xgboost-spark/xgboost-training-cm.py b/samples/xgboost-spark/xgboost-training-cm.py index ca5ab546819..34827c29a4e 100755 --- a/samples/xgboost-spark/xgboost-training-cm.py +++ b/samples/xgboost-spark/xgboost-training-cm.py @@ -178,7 +178,12 @@ def xgb_train_pipeline( confusion_matrix_task = confusion_matrix_op(predict_op.output, '%s/{{workflow.name}}/confusionmatrix' % output).apply(gcp.use_gcp_secret('user-gcp-sa')) - roc_task = roc_op(predict_op.output, true_label, '%s/{{workflow.name}}/roc' % output).apply(gcp.use_gcp_secret('user-gcp-sa')) + roc_task = roc_op( + predictions_dir=predict_op.output, + true_class=true_label, + true_score_column=true_label, + output_dir='%s/{{workflow.name}}/roc' % output + ).apply(gcp.use_gcp_secret('user-gcp-sa')) if __name__ == '__main__': import kfp.compiler as compiler