Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modify kfp command #378

Merged
merged 1 commit into from
Aug 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/fondant/component_spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,8 +284,9 @@ def from_fondant_component_spec(
"container": {
"image": fondant_component.image,
"command": [
"python3",
"main.py",
"fondant",
"execute",
"main",
"--input_manifest_path",
{"inputPath": "input_manifest_path"},
"--metadata",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ spec:
- container:
args: []
command:
- python3
- main.py
- fondant
- execute
- main
- --input_manifest_path
- /tmp/inputs/input_manifest_path/data
- --metadata
Expand Down Expand Up @@ -54,10 +55,10 @@ spec:
"{\"base_path\": \"/foo/bar\", \"pipeline_name\": \"test_pipeline\", \"run_id\":
\"test_pipeline-20230101000000\", \"component_id\": \"first_component\"}",
"storage_args": "a dummy string arg"}'
pipelines.kubeflow.org/component_ref: '{"digest": "2a304ce49a15404ba50dfd8b56ec43fa8ac8c29f80579d1c8fb974d3f1a5c87f"}'
pipelines.kubeflow.org/component_ref: '{"digest": "c53791e5eba77643348ea14b01bc20f273c32d827f5f1b1b896ef6965fd12d82"}'
pipelines.kubeflow.org/component_spec: '{"description": "This is an example
component", "implementation": {"container": {"command": ["python3", "main.py",
"--input_manifest_path", {"inputPath": "input_manifest_path"}, "--metadata",
component", "implementation": {"container": {"command": ["fondant", "execute",
"main", "--input_manifest_path", {"inputPath": "input_manifest_path"}, "--metadata",
{"inputValue": "metadata"}, "--component_spec", {"inputValue": "component_spec"},
"--input_partition_rows", {"inputValue": "input_partition_rows"}, "--storage_args",
{"inputValue": "storage_args"}, "--output_manifest_path", {"outputPath":
Expand All @@ -84,8 +85,9 @@ spec:
- container:
args: []
command:
- python3
- main.py
- fondant
- execute
- main
- --input_manifest_path
- /tmp/inputs/input_manifest_path/data
- --metadata
Expand Down Expand Up @@ -120,10 +122,10 @@ spec:
\"pipeline_name\": \"test_pipeline\", \"run_id\": \"test_pipeline-20230101000000\",
\"component_id\": \"second_component\"}", "storage_args": "a dummy string
arg"}'
pipelines.kubeflow.org/component_ref: '{"digest": "a02b0189397a2d9318982201f020dbbbe3962427ed150fe58cc69ff508cc68bb"}'
pipelines.kubeflow.org/component_ref: '{"digest": "455aeccd323115d9caae33621d3ecf5ad4de86da321f97c3761f77bc962f7fc2"}'
pipelines.kubeflow.org/component_spec: '{"description": "This is an example
component", "implementation": {"container": {"command": ["python3", "main.py",
"--input_manifest_path", {"inputPath": "input_manifest_path"}, "--metadata",
component", "implementation": {"container": {"command": ["fondant", "execute",
"main", "--input_manifest_path", {"inputPath": "input_manifest_path"}, "--metadata",
{"inputValue": "metadata"}, "--component_spec", {"inputValue": "component_spec"},
"--input_partition_rows", {"inputValue": "input_partition_rows"}, "--storage_args",
{"inputValue": "storage_args"}, "--output_manifest_path", {"outputPath":
Expand Down Expand Up @@ -171,8 +173,9 @@ spec:
- container:
args: []
command:
- python3
- main.py
- fondant
- execute
- main
- --input_manifest_path
- /tmp/inputs/input_manifest_path/data
- --metadata
Expand Down Expand Up @@ -210,10 +213,10 @@ spec:
"None", "metadata": "{\"base_path\": \"/foo/bar\", \"pipeline_name\": \"test_pipeline\",
\"run_id\": \"test_pipeline-20230101000000\", \"component_id\": \"third_component\"}",
"storage_args": "a dummy string arg"}'
pipelines.kubeflow.org/component_ref: '{"digest": "698791c6aa2ed14d4b337840116a7a995f403e5be414389b05ccf7942b9e4437"}'
pipelines.kubeflow.org/component_ref: '{"digest": "4e728e3a6242c68816de163eb5ec0398940c5fb6746adf57223ca595103e6c2a"}'
pipelines.kubeflow.org/component_spec: '{"description": "This is an example
component", "implementation": {"container": {"command": ["python3", "main.py",
"--input_manifest_path", {"inputPath": "input_manifest_path"}, "--metadata",
component", "implementation": {"container": {"command": ["fondant", "execute",
"main", "--input_manifest_path", {"inputPath": "input_manifest_path"}, "--metadata",
{"inputValue": "metadata"}, "--component_spec", {"inputValue": "component_spec"},
"--input_partition_rows", {"inputValue": "input_partition_rows"}, "--storage_args",
{"inputValue": "storage_args"}, "--output_manifest_path", {"outputPath":
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ spec:
- container:
args: []
command:
- python3
- main.py
- fondant
- execute
- main
- --input_manifest_path
- /tmp/inputs/input_manifest_path/data
- --metadata
Expand Down Expand Up @@ -54,10 +55,10 @@ spec:
"{\"base_path\": \"/foo/bar\", \"pipeline_name\": \"test_pipeline\", \"run_id\":
\"test_pipeline-20230101000000\", \"component_id\": \"first_component\"}",
"storage_args": "a dummy string arg"}'
pipelines.kubeflow.org/component_ref: '{"digest": "2a304ce49a15404ba50dfd8b56ec43fa8ac8c29f80579d1c8fb974d3f1a5c87f"}'
pipelines.kubeflow.org/component_ref: '{"digest": "c53791e5eba77643348ea14b01bc20f273c32d827f5f1b1b896ef6965fd12d82"}'
pipelines.kubeflow.org/component_spec: '{"description": "This is an example
component", "implementation": {"container": {"command": ["python3", "main.py",
"--input_manifest_path", {"inputPath": "input_manifest_path"}, "--metadata",
component", "implementation": {"container": {"command": ["fondant", "execute",
"main", "--input_manifest_path", {"inputPath": "input_manifest_path"}, "--metadata",
{"inputValue": "metadata"}, "--component_spec", {"inputValue": "component_spec"},
"--input_partition_rows", {"inputValue": "input_partition_rows"}, "--storage_args",
{"inputValue": "storage_args"}, "--output_manifest_path", {"outputPath":
Expand All @@ -84,8 +85,9 @@ spec:
- container:
args: []
command:
- python3
- main.py
- fondant
- execute
- main
- --input_manifest_path
- /tmp/inputs/input_manifest_path/data
- --metadata
Expand Down Expand Up @@ -132,10 +134,10 @@ spec:
"cropping_threshold": "0", "input_partition_rows": "None", "metadata": "{\"base_path\":
\"/foo/bar\", \"pipeline_name\": \"test_pipeline\", \"run_id\": \"test_pipeline-20230101000000\",
\"component_id\": \"image_cropping\"}", "padding": "0"}'
pipelines.kubeflow.org/component_ref: '{"digest": "e86f02b6b9cc878b6187e44bb3caf9291c3ce42c1939e19b0a97dacdc78a9d72"}'
pipelines.kubeflow.org/component_ref: '{"digest": "8a3c2b5736cf8297ad5848ec043987aed42c6fb12e6e26db25b922467b4d2d7f"}'
pipelines.kubeflow.org/component_spec: '{"description": "Component that removes
single-colored borders around images and crops them appropriately", "implementation":
{"container": {"command": ["python3", "main.py", "--input_manifest_path",
{"container": {"command": ["fondant", "execute", "main", "--input_manifest_path",
{"inputPath": "input_manifest_path"}, "--metadata", {"inputValue": "metadata"},
"--component_spec", {"inputValue": "component_spec"}, "--input_partition_rows",
{"inputValue": "input_partition_rows"}, "--cropping_threshold", {"inputValue":
Expand Down
11 changes: 6 additions & 5 deletions tests/example_pipelines/compiled_pipeline/kubeflow_pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ spec:
- container:
args: []
command:
- python3
- main.py
- fondant
- execute
- main
- --input_manifest_path
- /tmp/inputs/input_manifest_path/data
- --metadata
Expand Down Expand Up @@ -57,10 +58,10 @@ spec:
"{\"base_path\": \"/foo/bar\", \"pipeline_name\": \"test_pipeline\", \"run_id\":
\"test_pipeline-20230101000000\", \"component_id\": \"first_component\"}",
"storage_args": "a dummy string arg"}'
pipelines.kubeflow.org/component_ref: '{"digest": "2a304ce49a15404ba50dfd8b56ec43fa8ac8c29f80579d1c8fb974d3f1a5c87f"}'
pipelines.kubeflow.org/component_ref: '{"digest": "c53791e5eba77643348ea14b01bc20f273c32d827f5f1b1b896ef6965fd12d82"}'
pipelines.kubeflow.org/component_spec: '{"description": "This is an example
component", "implementation": {"container": {"command": ["python3", "main.py",
"--input_manifest_path", {"inputPath": "input_manifest_path"}, "--metadata",
component", "implementation": {"container": {"command": ["fondant", "execute",
"main", "--input_manifest_path", {"inputPath": "input_manifest_path"}, "--metadata",
{"inputValue": "metadata"}, "--component_spec", {"inputValue": "component_spec"},
"--input_partition_rows", {"inputValue": "input_partition_rows"}, "--storage_args",
{"inputValue": "storage_args"}, "--output_manifest_path", {"outputPath":
Expand Down
5 changes: 3 additions & 2 deletions tests/example_specs/component_specs/kubeflow_component.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,9 @@ implementation:
container:
image: example_component:latest
command:
- python3
- main.py
- fondant
- execute
- main
- --input_manifest_path
- inputPath: input_manifest_path
- --metadata
Expand Down