GeezerVison is showing github.com — feat: GenAI - Release the Model Garden SDK to GA · googleapis/python-aiplatform@49c3418
File tree
Expand file treeCollapse file tree
Open diff view settings
tests/unit/vertexai/model_garden
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: tests/unit/vertexai/model_garden/test_model_garden.py +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
|
34 | 34 | from google.cloud.aiplatform_v1beta1 import types |
35 | 35 | from google.cloud.aiplatform_v1beta1.services import model_garden_service |
36 | 36 | from vertexai import batch_prediction |
37 | | -from vertexai.preview import model_garden |
| 37 | +from vertexai import model_garden |
38 | 38 | import pytest |
39 | 39 |
|
40 | 40 | from google.protobuf import duration_pb2 |
|
Collapse file
Copy file name to clipboardExpand all lines: vertexai/model_garden/README.md +2-2Lines changed: 2 additions & 2 deletions - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
@@ -25,7 +25,7 @@ For detailed instructions, see [deploy an open model](https://cloud.google.com/v |
25 | 25 | This is the simplest way to deploy a model. If you provide just a model name, the SDK will use the default deployment configuration. |
26 | 26 |
|
27 | 27 | ```python |
28 | | -from vertexai.preview import model_garden |
| 28 | +from vertexai import model_garden |
29 | 29 |
|
30 | 30 | model = model_garden.OpenModel("google/paligemma@paligemma-224-float32") |
31 | 31 | endpoint = model.deploy() |
@@ -38,7 +38,7 @@ endpoint = model.deploy() |
38 | 38 | You can list all models that are currently deployable via Model Garden: |
39 | 39 |
|
40 | 40 | ```python |
41 | | -from vertexai.preview import model_garden |
| 41 | +from vertexai import model_garden |
42 | 42 |
|
43 | 43 | models = model_garden.list_deployable_models() |
44 | 44 | ``` |
|
Collapse file
Copy file name to clipboard +26Lines changed: 26 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
|
| 1 | +# Copyright 2025 Google LLC |
| 2 | +# |
| 3 | +# Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | +# you may not use this file except in compliance with the License. |
| 5 | +# You may obtain a copy of the License at |
| 6 | +# |
| 7 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | +# |
| 9 | +# Unless required by applicable law or agreed to in writing, software |
| 10 | +# distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | +# See the License for the specific language governing permissions and |
| 13 | +# limitations under the License. |
| 14 | +# |
| 15 | + |
| 16 | +"""Classes and functions for working with Model Garden.""" |
| 17 | + |
| 18 | +# We just want to re-export certain classes |
| 19 | +# pylint: disable=g-multiple-import,g-importing-member |
| 20 | +from vertexai.model_garden._model_garden import ( |
| 21 | + OpenModel, |
| 22 | + list_deployable_models, |
| 23 | +) |
| 24 | + |
| 25 | + |
| 26 | +__all__ = ("OpenModel", "list_deployable_models") |
Collapse file
Copy file name to clipboardExpand all lines: vertexai/model_garden/_model_garden.py +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -267,7 +267,7 @@ class OpenModel: |
267 | 267 | the format of `{organization}/{model}`. |
268 | 268 | """ |
269 | 269 |
|
270 | | - __module__ = "vertexai.preview.model_garden" |
| 270 | + __module__ = "vertexai.model_garden" |
271 | 271 |
|
272 | 272 | def __init__( |
273 | 273 | self, |
|