Skip to content

Commit

Permalink
SDK - Configure artifact name and path separately (again) (#1067)
Browse files Browse the repository at this point in the history
Restoring the #900 change that was overwritten by #879
  • Loading branch information
Ark-kun authored Apr 4, 2019
1 parent 8e2ea39 commit 9269bac
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions sdk/python/kfp/compiler/_op_to_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,10 +144,10 @@ def _outputs_to_json(outputs: Dict[str, dsl.PipelineParam],
return ret


def _build_conventional_artifact(name):
def _build_conventional_artifact(name, path):
return {
'name': name,
'path': '/' + name + '.json',
'path': path,
's3': {
# TODO: parameterize namespace for minio service
'endpoint': 'minio-service.kubeflow:9000',
Expand Down Expand Up @@ -176,9 +176,13 @@ def _op_to_template(op: dsl.ContainerOp):
processed_op = _process_container_ops(op)

# default output artifacts
output_artifact_paths = {}
output_artifact_paths.setdefault('mlpipeline-ui-metadata', '/mlpipeline-ui-metadata.json')
output_artifact_paths.setdefault('mlpipeline-metrics', '/mlpipeline-metrics.json')

output_artifacts = [
_build_conventional_artifact(name)
for name in ['mlpipeline-ui-metadata', 'mlpipeline-metrics']
_build_conventional_artifact(name, path)
for name, path in output_artifact_paths.items()
]

# workflow template
Expand Down

0 comments on commit 9269bac

Please sign in to comment.