Skip to content

Commit

Permalink
SDK/Components - Added /data to the generated file paths (kubeflow#663)
Browse files Browse the repository at this point in the history
This is needed for the future storage system based on volume mounts:
If outputs were written to files in the same dir (e.g. /outputs/out1.txt and /outputs/out2.txt), then we cannot separate them and mount to the downstream task containers independently.
  • Loading branch information
Ark-kun authored and k8s-ci-robot committed Jan 16, 2019
1 parent c2834c3 commit b12d5d8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions sdk/python/kfp/components/_components.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,14 +153,15 @@ def _generate_unique_suffix(data):

_inputs_dir = '/inputs'
_outputs_dir = '/outputs'
_single_io_file_name = 'data'


def _generate_input_file_name(port_name):
return _inputs_dir + '/' + _sanitize_file_name(port_name)
return _inputs_dir + '/' + _sanitize_file_name(port_name) + '/' + _single_io_file_name


def _generate_output_file_name(port_name):
return _outputs_dir + '/' + _sanitize_file_name(port_name)
return _outputs_dir + '/' + _sanitize_file_name(port_name) + '/' + _single_io_file_name


def _try_get_object_by_name(obj_name):
Expand Down

0 comments on commit b12d5d8

Please sign in to comment.