-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Google Cloud - Vertex_AI - Models - Upload_Tensorflow_model component…
… - Simplified the component after my Vertex SDK fixes were merged Some of my Vertex SDK fixes: googleapis/python-aiplatform#779 googleapis/python-aiplatform#882 googleapis/python-aiplatform#943 googleapis/python-aiplatform#997
- Loading branch information
Showing
2 changed files
with
12 additions
and
14 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,10 +5,10 @@ | |
|
||
def upload_Tensorflow_model_to_Google_Cloud_Vertex_AI( | ||
model_path: InputPath("TensorflowSavedModel"), | ||
tensorflow_version: str = "2.7", # TODO: Remove the explicit default once the upload_tensorflow_saved_model supports None | ||
tensorflow_version: str = None, | ||
use_gpu: bool = False, | ||
|
||
display_name: str = "Tensorflow model", | ||
display_name: str = None, | ||
description: str = None, | ||
|
||
# Uncomment when anyone requests these: | ||
|
@@ -19,7 +19,7 @@ def upload_Tensorflow_model_to_Google_Cloud_Vertex_AI( | |
# explanation_parameters: "google.cloud.aiplatform_v1.types.explanation.ExplanationParameters" = None, | ||
|
||
project: str = None, | ||
location: str = "us-central1", | ||
location: str = None, | ||
labels: dict = None, | ||
# encryption_spec_key_name: str = None, | ||
staging_bucket: str = None, | ||
|
@@ -75,8 +75,7 @@ def upload_Tensorflow_model_to_Google_Cloud_Vertex_AI( | |
func=upload_Tensorflow_model_to_Google_Cloud_Vertex_AI, | ||
base_image="python:3.9", | ||
packages_to_install=[ | ||
# "google-cloud-aiplatform==1.9.0", | ||
"git+https://github.com/Ark-kun/python-aiplatform@1e1cbfef76b7c5c8db705d5c4c17c3691de7b032#egg=google-cloud-aiplatform&subdirectory=." # branch: fix--Fixed-getitng-project-ID-when-running-on-Vertex-AI | ||
"google-cloud-aiplatform==1.16.0", | ||
], | ||
annotations={ | ||
"author": "Alexey Volkov <[email protected]>", | ||
|
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 |
---|---|---|
|
@@ -3,15 +3,15 @@ metadata: | |
annotations: {author: Alexey Volkov <[email protected]>, canonical_location: 'https://raw.githubusercontent.com/Ark-kun/pipeline_components/master/components/google-cloud/Vertex_AI/Models/Upload_Tensorflow_model/component.yaml'} | ||
inputs: | ||
- {name: model, type: TensorflowSavedModel} | ||
- {name: tensorflow_version, type: String, default: '2.7', optional: true} | ||
- {name: tensorflow_version, type: String, optional: true} | ||
- name: use_gpu | ||
type: Boolean | ||
default: "False" | ||
optional: true | ||
- {name: display_name, type: String, default: Tensorflow model, optional: true} | ||
- {name: display_name, type: String, optional: true} | ||
- {name: description, type: String, optional: true} | ||
- {name: project, type: String, optional: true} | ||
- {name: location, type: String, default: us-central1, optional: true} | ||
- {name: location, type: String, optional: true} | ||
- {name: labels, type: JsonObject, optional: true} | ||
- {name: staging_bucket, type: String, optional: true} | ||
outputs: | ||
|
@@ -24,9 +24,8 @@ implementation: | |
- sh | ||
- -c | ||
- (PIP_DISABLE_PIP_VERSION_CHECK=1 python3 -m pip install --quiet --no-warn-script-location | ||
'git+https://github.com/Ark-kun/python-aiplatform@1e1cbfef76b7c5c8db705d5c4c17c3691de7b032#egg=google-cloud-aiplatform&subdirectory=.' | ||
|| PIP_DISABLE_PIP_VERSION_CHECK=1 python3 -m pip install --quiet --no-warn-script-location | ||
'git+https://github.com/Ark-kun/python-aiplatform@1e1cbfef76b7c5c8db705d5c4c17c3691de7b032#egg=google-cloud-aiplatform&subdirectory=.' | ||
'google-cloud-aiplatform==1.16.0' || PIP_DISABLE_PIP_VERSION_CHECK=1 python3 | ||
-m pip install --quiet --no-warn-script-location 'google-cloud-aiplatform==1.16.0' | ||
--user) && "$0" "$@" | ||
- sh | ||
- -ec | ||
|
@@ -37,10 +36,10 @@ implementation: | |
- | | ||
def upload_Tensorflow_model_to_Google_Cloud_Vertex_AI( | ||
model_path, | ||
tensorflow_version = "2.7", # TODO: Remove the explicit default once the upload_tensorflow_saved_model supports None | ||
tensorflow_version = None, | ||
use_gpu = False, | ||
display_name = "Tensorflow model", | ||
display_name = None, | ||
description = None, | ||
# Uncomment when anyone requests these: | ||
|
@@ -51,7 +50,7 @@ implementation: | |
# explanation_parameters: "google.cloud.aiplatform_v1.types.explanation.ExplanationParameters" = None, | ||
project = None, | ||
location = "us-central1", | ||
location = None, | ||
labels = None, | ||
# encryption_spec_key_name: str = None, | ||
staging_bucket = None, | ||
|