Fixed bug in ROC component definition (#1093)
* Fixed bug in ROC component definition * Fixed the XGBoost sample * Fixed the ROC op usage in XGBoost sample
This commit is contained in:
parent
e7fe738e61
commit
b36c7bc233
|
|
@ -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},
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ import kfp.gcp as gcp
|
|||
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.
|
||||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue