You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
pre-commit: ## Runs the pre-commit checks over entire repo
23
-
cd pipelines &&\
24
-
poetry run pre-commit run --all-files
25
20
26
21
env ?= dev
27
22
AUTO_APPROVE_FLAG :=
28
-
deploy: ## Deploy the Terraform infrastructure to your project. Requires VERTEX_PROJECT_ID and VERTEX_LOCATION env variables to be set in env.sh. Optionally specify env=<dev|test|prod> (default = dev)
23
+
deploy: ## Deploy infrastructure to your project. Optionally set env=<dev|test|prod> (default = dev).
undeploy: ## DESTROY the Terraform infrastructure in your project. Requires VERTEX_PROJECT_ID and VERTEX_LOCATION env variables to be set in env.sh. Optionally specify env=<dev|test|prod> (default = dev)
31
+
undeploy: ## DESTROY the infrastructure in your project. Optionally set env=<dev|test|prod> (default = dev).
build: ## Build and push training and/or serving container(s) image using Docker. Specify targets=<training serving> e.g. targets=training or targets="training serving" (default)
52
+
images ?= training serving
53
+
build: ## Build and push container(s). Set images=<training serving> e.g. images=training (default = training serving).
run: ## Run pipeline in sandbox environment. Must specify pipeline=<training|prediction>. Optionally specify wait=<true|false> (default = false). Set compile=false to skip recompiling the pipeline and set build=false to skip rebuilding container images
67
+
run: ## Run pipeline. Must set pipeline=<training|prediction>. Optionally set wait=<true|false> (default = false), compile=<true|false> (default = true) to recompile pipeline, build=<true|false> (default = true) to rebuild container image(s), images=<training serving> (default = training serving) to set which images are rebuilt.
71
68
@if [ $(compile)="true" ];then\
72
69
$(MAKE) compile ;\
73
70
elif [ $(compile)!="false" ];then\
@@ -81,19 +78,30 @@ run: ## Run pipeline in sandbox environment. Must specify pipeline=<training|pre
81
78
exit;\
82
79
fi&&\
83
80
cd pipelines/src &&\
84
-
poetry run python -m pipelines.utils.trigger_pipeline --template_path=pipelines/${pipeline}/pipeline.yaml --display_name=${pipeline} --wait=${wait}
81
+
echo"Running $$pipeline pipeline"&&\
82
+
poetry run python -m pipelines.utils.trigger_pipeline --template_path=pipelines/${pipeline}.yaml --display_name=${pipeline} --wait=${wait}
83
+
84
+
training: ## Shortcut to run training pipeline. Rebuilds training and serving images. Supports same options as run.
85
+
$(MAKE) run pipeline=training images=training prediction
86
+
87
+
prediction: ## Shortcut to run prediction pipeline. Doesn't rebuilt images. Supports same options as run.
88
+
$(MAKE) run pipeline=prediction build=false
85
89
86
90
components ?= true
87
-
test: ## Run unit tests. Specify components=<true|false> to test scripts and optionally components
91
+
test: ## Run unit tests for pipelines. Optionally set components=<true|false> (default = true) to test components package.
88
92
@if [ $(components)="true" ];then\
89
-
echo"Testing components"&&\
93
+
echo"Running unit tests in components"&&\
90
94
cd components &&\
91
95
poetry run pytest &&\
92
96
cd .. ;\
93
97
elif [ $(components)!="false" ];then\
94
98
echo"ValueError: components must be either true or false";\
95
99
exit;\
96
100
fi&&\
97
-
echo"Testing scripts"&&\
101
+
echo"Running unit tests in pipelines"&&\
98
102
cd pipelines &&\
99
-
poetry run python -m pytest tests/utils
103
+
poetry run python -m pytest
104
+
105
+
pre-commit: ## Run pre-commit checks for pipelines.
0 commit comments