pipelines/components/local/confusion_matrix/component.yaml

23 lines
1.3 KiB
YAML

name: Confusion matrix
description: Calculates confusion matrix
inputs:
- {name: Predictions, type: GCSPath, description: 'GCS path of prediction file pattern.'} # type: {GCSPath: {data_type: CSV}}
- {name: Target lambda, type: String, default: '', description: 'Text of Python lambda function which computes target value. For example, "lambda x: x[''a''] + x[''b'']". If not set, the input must include a "target" column.'}
- {name: Output dir, type: GCSPath, description: 'GCS path of the output directory.'} # type: {GCSPath: {path_type: Directory}}
#outputs:
# - {name: UI metadata, type: UI metadata}
# - {name: Metrics, type: Metrics}
implementation:
container:
image: gcr.io/ml-pipeline/ml-pipeline-local-confusion-matrix:6554e133dd453c62aea05ebb57a04f897c11d070
command: [python2, /ml/confusion_matrix.py]
args: [
--predictions, {inputValue: Predictions},
--target_lambda, {inputValue: Target lambda},
--output, {inputValue: Output dir},
]
#Argo deletes the source files as soon as it uploads them to the artifact store. Trying to output the same files as parameter outputs fails since the source files are already deleted.
# fileOutputs:
# UI metadata: /mlpipeline-ui-metadata.json
# Metrics: /mlpipeline-metrics.json