GeezerVison is showing github.com — feat: add model_version_id to UploadModelResponse in aiplatform v1 mo… · yaoliugg/python-aiplatform@1c198f1
File treeExpand file treeCollapse file tree Open diff view settings .kokoro/samples/python3.6 google/cloud/aiplatform_v1 services/migration_service
scripts/readme-gen/templates tests/unit/gapic/aiplatform_v1
Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboard +40Lines changed: 40 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
| | 1 | +# Format: //devtools/kokoro/config/proto/build.proto | | 2 | + | | 3 | +# Build logs will be here | | 4 | +action { | | 5 | + define_artifacts { | | 6 | + regex: "**/*sponge_log.xml" | | 7 | + } | | 8 | +} | | 9 | + | | 10 | +# Specify which tests to run | | 11 | +env_vars: { | | 12 | + key: "RUN_TESTS_SESSION" | | 13 | + value: "py-3.6" | | 14 | +} | | 15 | + | | 16 | +# Declare build specific Cloud project. | | 17 | +env_vars: { | | 18 | + key: "BUILD_SPECIFIC_GCLOUD_PROJECT" | | 19 | + value: "ucaip-sample-tests" | | 20 | +} | | 21 | + | | 22 | +env_vars: { | | 23 | + key: "TRAMPOLINE_BUILD_FILE" | | 24 | + value: "github/python-aiplatform/.kokoro/test-samples.sh" | | 25 | +} | | 26 | + | | 27 | +# Configure the docker image for kokoro-trampoline. | | 28 | +env_vars: { | | 29 | + key: "TRAMPOLINE_IMAGE" | | 30 | + value: "gcr.io/cloud-devrel-kokoro-resources/python-samples-testing-docker" | | 31 | +} | | 32 | + | | 33 | +# Download secrets for samples | | 34 | +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/python-docs-samples" | | 35 | + | | 36 | +# Download trampoline resources. | | 37 | +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" | | 38 | + | | 39 | +# Use the trampoline script to run in docker. | | 40 | +build_file: "python-aiplatform/.kokoro/trampoline_v2.sh" |
Collapse file Copy file name to clipboard +7Lines changed: 7 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
| | 1 | +# Format: //devtools/kokoro/config/proto/build.proto | | 2 | + | | 3 | +env_vars: { | | 4 | + key: "INSTALL_LIBRARY_FROM_SOURCE" | | 5 | + value: "True" | | 6 | +} | | 7 | + |
Collapse file Copy file name to clipboard +11Lines changed: 11 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
| | 1 | +# Format: //devtools/kokoro/config/proto/build.proto | | 2 | + | | 3 | +env_vars: { | | 4 | + key: "INSTALL_LIBRARY_FROM_SOURCE" | | 5 | + value: "True" | | 6 | +} | | 7 | + | | 8 | +env_vars: { | | 9 | + key: "TRAMPOLINE_BUILD_FILE" | | 10 | + value: "github/python-aiplatform/.kokoro/test-samples-against-head.sh" | | 11 | +} |
Collapse file Copy file name to clipboard +6Lines changed: 6 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
| | 1 | +# Format: //devtools/kokoro/config/proto/build.proto | | 2 | + | | 3 | +env_vars: { | | 4 | + key: "INSTALL_LIBRARY_FROM_SOURCE" | | 5 | + value: "True" | | 6 | +} |
Collapse file Copy file name to clipboardExpand all lines: google/cloud/aiplatform_v1/services/migration_service/client.py +9-9Lines changed: 9 additions & 9 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -218,40 +218,40 @@ def parse_dataset_path(path: str) -> Dict[str, str]: | 218 | 218 | @staticmethod | 219 | 219 | def dataset_path( | 220 | 220 | project: str, | | 221 | + location: str, | 221 | 222 | dataset: str, | 222 | 223 | ) -> str: | 223 | 224 | """Returns a fully-qualified dataset string.""" | 224 | | - return "projects/{project}/datasets/{dataset}".format( | | 225 | + return "projects/{project}/locations/{location}/datasets/{dataset}".format( | 225 | 226 | project=project, | | 227 | + location=location, | 226 | 228 | dataset=dataset, | 227 | 229 | ) | 228 | 230 |
| 229 | 231 | @staticmethod | 230 | 232 | def parse_dataset_path(path: str) -> Dict[str, str]: | 231 | 233 | """Parses a dataset path into its component segments.""" | 232 | | - m = re.match(r"^projects/(?P<project>.+?)/datasets/(?P<dataset>.+?)$", path) | | 234 | + m = re.match( | | 235 | + r"^projects/(?P<project>.+?)/locations/(?P<location>.+?)/datasets/(?P<dataset>.+?)$", | | 236 | + path, | | 237 | + ) | 233 | 238 | return m.groupdict() if m else {} | 234 | 239 |
| 235 | 240 | @staticmethod | 236 | 241 | def dataset_path( | 237 | 242 | project: str, | 238 | | - location: str, | 239 | 243 | dataset: str, | 240 | 244 | ) -> str: | 241 | 245 | """Returns a fully-qualified dataset string.""" | 242 | | - return "projects/{project}/locations/{location}/datasets/{dataset}".format( | | 246 | + return "projects/{project}/datasets/{dataset}".format( | 243 | 247 | project=project, | 244 | | - location=location, | 245 | 248 | dataset=dataset, | 246 | 249 | ) | 247 | 250 |
| 248 | 251 | @staticmethod | 249 | 252 | def parse_dataset_path(path: str) -> Dict[str, str]: | 250 | 253 | """Parses a dataset path into its component segments.""" | 251 | | - m = re.match( | 252 | | - r"^projects/(?P<project>.+?)/locations/(?P<location>.+?)/datasets/(?P<dataset>.+?)$", | 253 | | - path, | 254 | | - ) | | 254 | + m = re.match(r"^projects/(?P<project>.+?)/datasets/(?P<dataset>.+?)$", path) | 255 | 255 | return m.groupdict() if m else {} | 256 | 256 |
| 257 | 257 | @staticmethod | |
Collapse file Copy file name to clipboardExpand all lines: google/cloud/aiplatform_v1/types/model_service.py +7Lines changed: 7 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -121,12 +121,19 @@ class UploadModelResponse(proto.Message): | 121 | 121 | model (str): | 122 | 122 | The name of the uploaded Model resource. Format: | 123 | 123 | ``projects/{project}/locations/{location}/models/{model}`` | | 124 | + model_version_id (str): | | 125 | + Output only. The version ID of the model that | | 126 | + is uploaded. | 124 | 127 | """ | 125 | 128 |
| 126 | 129 | model = proto.Field( | 127 | 130 | proto.STRING, | 128 | 131 | number=1, | 129 | 132 | ) | | 133 | + model_version_id = proto.Field( | | 134 | + proto.STRING, | | 135 | + number=2, | | 136 | + ) | 130 | 137 |
| 131 | 138 |
| 132 | 139 | class GetModelRequest(proto.Message): | |
Collapse file Copy file name to clipboard +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
| 1 | 1 | [mypy] | 2 | | -python_version = 3.7 | | 2 | +python_version = 3.6 | 3 | 3 | namespace_packages = True |
Collapse file Copy file name to clipboardExpand all lines: samples/model-builder/noxfile.py +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -89,7 +89,7 @@ def get_pytest_env_vars() -> Dict[str, str]: | 89 | 89 |
| 90 | 90 | # DO NOT EDIT - automatically generated. | 91 | 91 | # All versions used to test samples. | 92 | | -ALL_VERSIONS = ["3.7", "3.8", "3.9", "3.10"] | | 92 | +ALL_VERSIONS = ["3.6", "3.7", "3.8", "3.9", "3.10"] | 93 | 93 |
| 94 | 94 | # Any default versions that should be ignored. | 95 | 95 | IGNORED_VERSIONS = TEST_CONFIG["ignored_versions"] | |
Collapse file Copy file name to clipboardExpand all lines: samples/snippets/noxfile.py +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -89,7 +89,7 @@ def get_pytest_env_vars() -> Dict[str, str]: | 89 | 89 |
| 90 | 90 | # DO NOT EDIT - automatically generated. | 91 | 91 | # All versions used to test samples. | 92 | | -ALL_VERSIONS = ["3.7", "3.8", "3.9", "3.10"] | | 92 | +ALL_VERSIONS = ["3.6", "3.7", "3.8", "3.9", "3.10"] | 93 | 93 |
| 94 | 94 | # Any default versions that should be ignored. | 95 | 95 | IGNORED_VERSIONS = TEST_CONFIG["ignored_versions"] | |
Collapse file Copy file name to clipboardExpand all lines: scripts/readme-gen/templates/install_deps.tmpl.rst +1-1Lines changed: 1 addition & 1 deletion - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
@@ -12,7 +12,7 @@ Install Dependencies | 12 | 12 | .. _Python Development Environment Setup Guide: | 13 | 13 | https://cloud.google.com/python/setup | 14 | 14 |
| 15 | | -#. Create a virtualenv. Samples are compatible with Python 3.7+. | | 15 | +#. Create a virtualenv. Samples are compatible with Python 3.6+. | 16 | 16 |
| 17 | 17 | .. code-block:: bash | 18 | 18 |
| |
|