-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add support for artifact URL pipeline specs
- Loading branch information
Jonny Browning (Datatonic)
authored
Jul 7, 2022
1 parent
278eb95
commit 47a8f96
Showing
9 changed files
with
170 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
module "hello_world_pipeline" { | ||
source = "../../" | ||
project = var.project | ||
vertex_region = "europe-west2" | ||
cloud_scheduler_region = "europe-west2" | ||
pipeline_spec_path = "https://europe-west2-kfp.pkg.dev/${var.project}/${var.ar_repository}/hello-world/latest" | ||
parameter_values = { | ||
"text" = "Hello, world!" | ||
} | ||
gcs_output_directory = "gs://my-bucket/my-output-directory" | ||
vertex_service_account_email = "my-vertex-service-account@my-gcp-project-id.iam.gserviceaccount.com" | ||
time_zone = "UTC" | ||
schedule = "0 0 * * *" | ||
cloud_scheduler_job_name = "pipeline-from-local-spec" | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
output "id" { | ||
value = module.hello_world_pipeline.id | ||
description = "an identifier for the Cloud Scheduler job resource with format projects/{{project}}/locations/{{region}}/jobs/{{name}}" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
variable "project" { | ||
type = string | ||
description = "The GCP project ID where the cloud scheduler job and Vertex Pipeline should be deployed." | ||
} | ||
|
||
variable "ar_repository" { | ||
type = string | ||
description = "Name of the Artifact Registry repository used to store the pipeline definition." | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
components: | ||
comp-hello-world: | ||
executorLabel: exec-hello-world | ||
deploymentSpec: | ||
executors: | ||
exec-hello-world: | ||
container: | ||
args: | ||
- --executor_input | ||
- '{{$}}' | ||
- --function_to_execute | ||
- hello_world | ||
command: | ||
- sh | ||
- -c | ||
- "\nif ! [ -x \"$(command -v pip)\" ]; then\n python3 -m ensurepip ||\ | ||
\ python3 -m ensurepip --user || apt-get install python3-pip\nfi\n\nPIP_DISABLE_PIP_VERSION_CHECK=1\ | ||
\ python3 -m pip install --quiet --no-warn-script-location 'kfp==2.0.0-beta.0'\ | ||
\ && \"$0\" \"$@\"\n" | ||
- sh | ||
- -ec | ||
- 'program_path=$(mktemp -d) | ||
printf "%s" "$0" > "$program_path/ephemeral_component.py" | ||
python3 -m kfp.components.executor_main --component_module_path "$program_path/ephemeral_component.py" "$@" | ||
' | ||
- "\nimport kfp\nfrom kfp import dsl\nfrom kfp.dsl import *\nfrom typing import\ | ||
\ *\n\ndef hello_world():\n print(\"Hello, world!\")\n\n" | ||
image: python:3.7 | ||
pipelineInfo: | ||
name: hello-world | ||
root: | ||
dag: | ||
tasks: | ||
hello-world: | ||
cachingOptions: | ||
enableCache: true | ||
componentRef: | ||
name: comp-hello-world | ||
taskInfo: | ||
name: hello-world | ||
schemaVersion: 2.1.0 | ||
sdkVersion: kfp-2.0.0-beta.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters