Skip to content

Commit

Permalink
Move output parameters to /var/run/kfp/parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
judahrand committed Sep 10, 2021
1 parent 74349d0 commit 453d7bb
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 24 deletions.
2 changes: 1 addition & 1 deletion sdk/python/kfp/components/_components.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ def _load_component_spec_from_component_text(text) -> ComponentSpec:


_inputs_dir = '/tmp/inputs'
_outputs_dir = '/tmp/outputs'
_outputs_dir = '/var/run/kfp/parameter'
_single_io_file_name = 'data'


Expand Down
4 changes: 2 additions & 2 deletions v2/cacheutils/cache_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ func TestGenerateCacheKey(t *testing.T) {

executorInputOutputs: &pipelinespec.ExecutorInput_Outputs{
Parameters: map[string]*pipelinespec.ExecutorInput_OutputParameter{
"output_parameter_one": {OutputFile: "/tmp/outputs/output_parameter_one/data"},
"output_parameter_two": {OutputFile: "/tmp/outputs/output_parameter_two/data"},
"output_parameter_one": {OutputFile: "/var/run/kfp/parameter/output_parameter_one/data"},
"output_parameter_two": {OutputFile: "/var/run/kfp/parameter/output_parameter_two/data"},
},
Artifacts: map[string]*pipelinespec.ArtifactList{
"model": {
Expand Down
14 changes: 7 additions & 7 deletions v2/compiler/argo_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,10 @@ func Test_argo_compiler(t *testing.T) {
parameters:
- name: execution-id
valueFrom:
path: /tmp/outputs/execution-id
path: /var/run/kfp/parameter/execution-id
- name: executor-input
valueFrom:
path: /tmp/outputs/executor-input
path: /var/run/kfp/parameter/executor-input
- container:
args:
- sh
Expand Down Expand Up @@ -247,10 +247,10 @@ func Test_argo_compiler(t *testing.T) {
parameters:
- name: execution-id
valueFrom:
path: /tmp/outputs/execution-id
path: /var/run/kfp/parameter/execution-id
- name: context-id
valueFrom:
path: /tmp/outputs/context-id
path: /var/run/kfp/parameter/context-id
- dag:
tasks:
- arguments:
Expand Down Expand Up @@ -284,7 +284,7 @@ func Test_argo_compiler(t *testing.T) {
},
{
jobPath: "testdata/importer.json",
expectedText: `
expectedText: `
apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
Expand Down Expand Up @@ -402,10 +402,10 @@ func Test_argo_compiler(t *testing.T) {
parameters:
- name: execution-id
valueFrom:
path: /tmp/outputs/execution-id
path: /var/run/kfp/parameter/execution-id
- name: context-id
valueFrom:
path: /tmp/outputs/context-id
path: /var/run/kfp/parameter/context-id
- dag:
tasks:
- arguments:
Expand Down
4 changes: 2 additions & 2 deletions v2/compiler/container.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@ func (c *workflowCompiler) addContainerDriverTemplate() string {
},
Outputs: wfapi.Outputs{
Parameters: []wfapi.Parameter{
{Name: paramExecutionID, ValueFrom: &wfapi.ValueFrom{Path: "/tmp/outputs/execution-id"}},
{Name: paramExecutorInput, ValueFrom: &wfapi.ValueFrom{Path: "/tmp/outputs/executor-input"}},
{Name: paramExecutionID, ValueFrom: &wfapi.ValueFrom{Path: "/var/run/kfp/parameter/execution-id"}},
{Name: paramExecutorInput, ValueFrom: &wfapi.ValueFrom{Path: "/var/run/kfp/parameter/executor-input"}},
},
},
Container: &k8score.Container{
Expand Down
4 changes: 2 additions & 2 deletions v2/compiler/dag.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,8 @@ func (c *workflowCompiler) addDAGDriverTemplate() string {
},
Outputs: wfapi.Outputs{
Parameters: []wfapi.Parameter{
{Name: paramExecutionID, ValueFrom: &wfapi.ValueFrom{Path: "/tmp/outputs/execution-id"}},
{Name: paramContextID, ValueFrom: &wfapi.ValueFrom{Path: "/tmp/outputs/context-id"}},
{Name: paramExecutionID, ValueFrom: &wfapi.ValueFrom{Path: "/var/run/kfp/parameter/execution-id"}},
{Name: paramContextID, ValueFrom: &wfapi.ValueFrom{Path: "/var/run/kfp/parameter/context-id"}},
},
},
Container: &k8score.Container{
Expand Down
20 changes: 10 additions & 10 deletions v2/component/runtime_info_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,15 +95,15 @@ func Test_parseRuntimeInfo(t *testing.T) {
"outputParameters": {
"my_param": {
"type": "INT",
"path": "/tmp/outputs/my_param/data"
"path": "/var/run/kfp/parameter/my_param/data"
}
}
}`,
want: &runtimeInfo{
OutputParameters: map[string]*outputParameter{
"my_param": {
Type: "INT",
Path: "/tmp/outputs/my_param/data",
Path: "/var/run/kfp/parameter/my_param/data",
},
},
},
Expand All @@ -115,15 +115,15 @@ func Test_parseRuntimeInfo(t *testing.T) {
"outputArtifacts": {
"my_artifact": {
"instanceSchema": "properties:\ntitle: kfp.Dataset\ntype: object\n",
"metadataPath": "/tmp/outputs/my_artifact/data"
"metadataPath": "/var/run/kfp/parameter/my_artifact/data"
}
}
}`,
want: &runtimeInfo{
OutputArtifacts: map[string]*outputArtifact{
"my_artifact": {
InstanceSchema: "properties:\ntitle: kfp.Dataset\ntype: object\n",
MetadataPath: "/tmp/outputs/my_artifact/data",
MetadataPath: "/var/run/kfp/parameter/my_artifact/data",
},
},
},
Expand Down Expand Up @@ -212,23 +212,23 @@ func TestExecutorInputGeneration(t *testing.T) {
"outputParameters": {
"output_parameter_one": {
"type": "STRING",
"path": "/tmp/outputs/output_parameter_one/data"
"path": "/var/run/kfp/parameter/output_parameter_one/data"
},
"output_parameter_two": {
"type": "INT",
"path": "/tmp/outputs/output_parameter_two/data"
"path": "/var/run/kfp/parameter/output_parameter_two/data"
}
},
"outputArtifacts": {
"model": {
"schemaTitle": "",
"instanceSchema": "title: kfp.Model\ntype: object\nproperties:\n framework:\n type: string\n framework_version:\n type: string\n",
"metadataPath": "/tmp/outputs/model/data"
"metadataPath": "/var/run/kfp/parameter/model/data"
},
"metrics": {
"schemaTitle": "kfp.Metrics",
"instanceSchema": "",
"metadataPath": "/tmp/outputs/metrics/data"
"metadataPath": "/var/run/kfp/parameter/metrics/data"
}
}
}`, dataset_one_path, dataset_two_path),
Expand Down Expand Up @@ -263,8 +263,8 @@ func TestExecutorInputGeneration(t *testing.T) {
},
Outputs: &pipelinespec.ExecutorInput_Outputs{
Parameters: map[string]*pipelinespec.ExecutorInput_OutputParameter{
"output_parameter_one": {OutputFile: "/tmp/outputs/output_parameter_one/data"},
"output_parameter_two": {OutputFile: "/tmp/outputs/output_parameter_two/data"},
"output_parameter_one": {OutputFile: "/var/run/kfp/parameter/output_parameter_one/data"},
"output_parameter_two": {OutputFile: "/var/run/kfp/parameter/output_parameter_two/data"},
},
Artifacts: map[string]*pipelinespec.ArtifactList{
"model": {
Expand Down

0 comments on commit 453d7bb

Please sign in to comment.