Skip to content

Commit 49c3418

Browse files
vertex-sdk-botcopybara-github
authored andcommitted
feat: GenAI - Release the Model Garden SDK to GA
PiperOrigin-RevId: 758838881
1 parent 51b13e5 commit 49c3418

4 files changed

Lines changed: 30 additions & 4 deletions

File tree

‎tests/unit/vertexai/model_garden/test_model_garden.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
from google.cloud.aiplatform_v1beta1 import types
3535
from google.cloud.aiplatform_v1beta1.services import model_garden_service
3636
from vertexai import batch_prediction
37-
from vertexai.preview import model_garden
37+
from vertexai import model_garden
3838
import pytest
3939

4040
from google.protobuf import duration_pb2

‎vertexai/model_garden/README.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ For detailed instructions, see [deploy an open model](https://cloud.google.com/v
2525
This is the simplest way to deploy a model. If you provide just a model name, the SDK will use the default deployment configuration.
2626

2727
```python
28-
from vertexai.preview import model_garden
28+
from vertexai import model_garden
2929

3030
model = model_garden.OpenModel("google/paligemma@paligemma-224-float32")
3131
endpoint = model.deploy()
@@ -38,7 +38,7 @@ endpoint = model.deploy()
3838
You can list all models that are currently deployable via Model Garden:
3939

4040
```python
41-
from vertexai.preview import model_garden
41+
from vertexai import model_garden
4242

4343
models = model_garden.list_deployable_models()
4444
```

‎vertexai/model_garden/__init__.py‎

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
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")

‎vertexai/model_garden/_model_garden.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ class OpenModel:
267267
the format of `{organization}/{model}`.
268268
"""
269269

270-
__module__ = "vertexai.preview.model_garden"
270+
__module__ = "vertexai.model_garden"
271271

272272
def __init__(
273273
self,

0 commit comments

Comments
 (0)