7
7
- {name: display_name, type: String, optional: true}
8
8
- {name: description, type: String, optional: true}
9
9
- {name: project, type: String, optional: true}
10
- - {name: location, type: String, default: us-central1, optional: true}
10
+ - {name: location, type: String, optional: true}
11
11
- {name: labels, type: JsonObject, optional: true}
12
12
- {name: staging_bucket, type: String, optional: true}
13
13
outputs :
@@ -20,9 +20,8 @@ implementation:
20
20
- sh
21
21
- -c
22
22
- (PIP_DISABLE_PIP_VERSION_CHECK=1 python3 -m pip install --quiet --no-warn-script-location
23
- ' git+https://github.com/Ark-kun/python-aiplatform@9b50f62b9d1409644656fb3202edc7be19c722f4#egg=google-cloud-aiplatform&subdirectory=.'
24
- || PIP_DISABLE_PIP_VERSION_CHECK=1 python3 -m pip install --quiet --no-warn-script-location
25
- ' git+https://github.com/Ark-kun/python-aiplatform@9b50f62b9d1409644656fb3202edc7be19c722f4#egg=google-cloud-aiplatform&subdirectory=.'
23
+ ' google-cloud-aiplatform==1.16.0' || PIP_DISABLE_PIP_VERSION_CHECK=1 python3
24
+ -m pip install --quiet --no-warn-script-location 'google-cloud-aiplatform==1.16.0'
26
25
--user) && "$0" "$@"
27
26
- sh
28
27
- -ec
@@ -46,12 +45,11 @@ implementation:
46
45
# explanation_parameters: "google.cloud.aiplatform_v1.types.explanation.ExplanationParameters" = None,
47
46
48
47
project = None,
49
- location = "us-central1" ,
48
+ location = None ,
50
49
labels = None,
51
50
# encryption_spec_key_name: str = None,
52
51
staging_bucket = None,
53
52
):
54
- import datetime
55
53
import json
56
54
import os
57
55
import shutil
@@ -70,8 +68,6 @@ implementation:
70
68
_, renamed_model_path = tempfile.mkstemp(suffix=".pkl")
71
69
shutil.copyfile(src=model_path, dst=renamed_model_path)
72
70
73
- display_name = display_name or "Scikit-learn model " + datetime.datetime.now().isoformat(sep=" ")
74
-
75
71
model = aiplatform.Model.upload_scikit_learn_model_file(
76
72
model_file_path=renamed_model_path,
77
73
sklearn_version=sklearn_version,
0 commit comments