Skip to content

Commit 8070411

Browse files
vertex-sdk-botcopybara-github
authored andcommitted
feat: add support for partial failures sink in import rag files.
PiperOrigin-RevId: 675672254
1 parent 470933f commit 8070411

File tree

67 files changed

+130
-1234
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+130
-1234
lines changed

.kokoro/release.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ python3 -m releasetool publish-reporter-script > /tmp/publisher-script; source /
2323
export PYTHONUNBUFFERED=1
2424

2525
# Move into the `google-cloud-aiplatform` package, build the distribution and upload.
26-
GCA_TWINE_PASSWORD=$(cat "${KOKORO_KEYSTORE_DIR}/73713_google-cloud-pypi-token-keystore-2")
26+
GCA_TWINE_PASSWORD=$(cat "${KOKORO_KEYSTORE_DIR}/73713_google-cloud-pypi-token-keystore-1")
2727
cd github/python-aiplatform
2828
python3 setup.py sdist bdist_wheel
2929
twine upload --username __token__ --password "${GCA_TWINE_PASSWORD}" dist/*

.kokoro/release/common.cfg

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ before_action {
2828
fetch_keystore {
2929
keystore_resource {
3030
keystore_config_id: 73713
31-
keyname: "google-cloud-pypi-token-keystore-2"
31+
keyname: "google-cloud-pypi-token-keystore-1"
3232
}
3333
}
3434
}

.release-please-manifest.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "1.67.1"
2+
".": "1.66.0"
33
}

CHANGELOG.md

-30
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,5 @@
11
# Changelog
22

3-
## [1.67.1](https://github.com/googleapis/python-aiplatform/compare/v1.67.0...v1.67.1) (2024-09-18)
4-
5-
6-
### Bug Fixes
7-
8-
* Fix rag corpus creation error ([6083b93](https://github.com/googleapis/python-aiplatform/commit/6083b93848be6ec975c95cd072c8d86357339d02))
9-
10-
## [1.67.0](https://github.com/googleapis/python-aiplatform/compare/v1.66.0...v1.67.0) (2024-09-17)
11-
12-
13-
### Features
14-
15-
* Add support for partial failures sink in import rag files. ([07e471e](https://github.com/googleapis/python-aiplatform/commit/07e471e0a069551f2c855e167e549fa92ac6af95))
16-
* Adding Feature Store Vector DB option for RAG corpuses to SDK ([cfc3421](https://github.com/googleapis/python-aiplatform/commit/cfc3421fe8a883d459b66ed8c9f39697ded23f20))
17-
* Adding Pinecone Vector DB option for RAG corpuses to SDK ([f78b953](https://github.com/googleapis/python-aiplatform/commit/f78b953f561b8697d07a530e89c7e727db1161ed))
18-
* Adding Vertex Vector Search Vector DB option for RAG corpuses to SDK ([f882657](https://github.com/googleapis/python-aiplatform/commit/f882657183e34c8e07baa4b8dc9f45ed8bca9db7))
19-
* Allow customizing pipeline caching options for model evaluation jobs. ([73490b2](https://github.com/googleapis/python-aiplatform/commit/73490b22a239cb1a3c31349f8db6cfbc5232e231))
20-
* GenAI - Switched the GA version of the `generative_models` classes to use the v1 service APIs instead of v1beta1 ([66d84af](https://github.com/googleapis/python-aiplatform/commit/66d84afdd5b20f70b3ff62f25cc32ac0b324d5d5))
21-
22-
23-
### Bug Fixes
24-
25-
* GenAI - Fixed `GenerativeModel.compute_tokens` for v1 API ([0de2987](https://github.com/googleapis/python-aiplatform/commit/0de298786c43427cb1a20b91cbabd1ce921c16da))
26-
* Tensorboard - Fix error in tensorboard batch upload of nested dirs ([ab157c8](https://github.com/googleapis/python-aiplatform/commit/ab157c8ead718b2a1a1d13306c1256c1cb2561f1))
27-
28-
29-
### Documentation
30-
31-
* Manually add summary overview page. ([0bc608a](https://github.com/googleapis/python-aiplatform/commit/0bc608a9c045007f12325231ed7f0069a40f469b))
32-
333
## [1.66.0](https://github.com/googleapis/python-aiplatform/compare/v1.65.0...v1.66.0) (2024-09-11)
344

355

README.rst

+12-4
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,6 @@ Vertex AI SDK for Python
33

44
|GA| |pypi| |versions| |unit-tests| |system-tests| |sample-tests|
55

6-
.. note::
7-
8-
For Gemini API and Generative AI on Vertex AI, please reference `Vertex Generative AI SDK for Python`_
9-
.. _Vertex Generative AI SDK for Python: https://cloud.google.com/vertex-ai/generative-ai/docs/reference/python/latest
106

117
`Vertex AI`_: Google Vertex AI is an integrated suite of machine learning tools and services for building and using ML models with AutoML or custom code. It offers both novices and experts the best workbench for the entire machine learning development lifecycle.
128

@@ -117,6 +113,18 @@ Vertex AI SDK resource based functionality can be used by importing the followin
117113
118114
from google.cloud import aiplatform
119115
116+
Vertex AI SDK preview functionality can be used by importing the following namespace:
117+
118+
.. code-block:: Python
119+
120+
from vertexai import preview
121+
122+
Vertex AI SDK general availability (GA) functionality can be used by importing the following namespace:
123+
124+
.. code-block:: Python
125+
126+
import vertexai
127+
120128
Initialization
121129
^^^^^^^^^^^^^^
122130
Initialize the SDK to store common configurations that you use with the SDK.

docs/README.rst

+22-16
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,7 @@
11
Vertex AI SDK for Python
22
=================================================
33

4-
|GA| |pypi| |versions| |unit-tests| |system-tests| |sample-tests|
5-
6-
.. note::
7-
8-
For Gemini API and Generative AI on Vertex AI, please reference `Vertex Generative AI SDK for Python`_
9-
.. _Vertex Generative AI SDK for Python: https://cloud.google.com/vertex-ai/generative-ai/docs/reference/python/latest
4+
|GA| |pypi| |versions|
105

116
`Vertex AI`_: Google Vertex AI is an integrated suite of machine learning tools and services for building and using ML models with AutoML or custom code. It offers both novices and experts the best workbench for the entire machine learning development lifecycle.
127

@@ -19,16 +14,11 @@ Vertex AI SDK for Python
1914
:target: https://pypi.org/project/google-cloud-aiplatform/
2015
.. |versions| image:: https://img.shields.io/pypi/pyversions/google-cloud-aiplatform.svg
2116
:target: https://pypi.org/project/google-cloud-aiplatform/
22-
.. |unit-tests| image:: https://storage.googleapis.com/cloud-devrel-public/python-aiplatform/badges/sdk-unit-tests.svg
23-
:target: https://storage.googleapis.com/cloud-devrel-public/python-aiplatform/badges/sdk-unit-tests.html
24-
.. |system-tests| image:: https://storage.googleapis.com/cloud-devrel-public/python-aiplatform/badges/sdk-system-tests.svg
25-
:target: https://storage.googleapis.com/cloud-devrel-public/python-aiplatform/badges/sdk-system-tests.html
26-
.. |sample-tests| image:: https://storage.googleapis.com/cloud-devrel-public/python-aiplatform/badges/sdk-sample-tests.svg
27-
:target: https://storage.googleapis.com/cloud-devrel-public/python-aiplatform/badges/sdk-sample-tests.html
2817
.. _Vertex AI: https://cloud.google.com/vertex-ai/docs
29-
.. _Client Library Documentation: https://cloud.google.com/python/docs/reference/aiplatform/latest
18+
.. _Client Library Documentation: https://cloud.google.com/python/docs/reference/aiplatform/latest/summary_overview
3019
.. _Product Documentation: https://cloud.google.com/vertex-ai/docs
3120

21+
3222
Quick Start
3323
-----------
3424

@@ -69,6 +59,7 @@ Mac/Linux
6959
<your-env>/bin/pip install google-cloud-aiplatform
7060
7161
62+
7263
Windows
7364
^^^^^^^
7465

@@ -79,7 +70,6 @@ Windows
7970
<your-env>\Scripts\activate
8071
<your-env>\Scripts\pip.exe install google-cloud-aiplatform
8172
82-
8373
Supported Python Versions
8474
^^^^^^^^^^^^^^^^^^^^^^^^^
8575
Python >= 3.8
@@ -117,6 +107,18 @@ Vertex AI SDK resource based functionality can be used by importing the followin
117107
118108
from google.cloud import aiplatform
119109
110+
Vertex AI SDK preview functionality can be used by importing the following namespace:
111+
112+
.. code-block:: Python
113+
114+
from vertexai import preview
115+
116+
Vertex AI SDK general availability (GA) functionality can be used by importing the following namespace:
117+
118+
.. code-block:: Python
119+
120+
import vertexai
121+
120122
Initialization
121123
^^^^^^^^^^^^^^
122124
Initialize the SDK to store common configurations that you use with the SDK.
@@ -173,8 +175,8 @@ You can also create and import a dataset in separate steps:
173175
my_dataset = aiplatform.TextDataset.create(
174176
display_name="my-dataset")
175177
176-
my_dataset.import_data(
177-
gcs_source=['gs://path/to/my/dataset.csv'],
178+
my_dataset.import(
179+
gcs_source=['gs://path/to/my/dataset.csv']
178180
import_schema_uri=aiplatform.schema.dataset.ioformat.text.multi_label_classification
179181
)
180182
@@ -230,6 +232,7 @@ It must write the model artifact to the environment variable populated by the tr
230232
container_uri="us-docker.pkg.dev/vertex-ai/training/tf-cpu.2-2:latest",
231233
requirements=["gcsfs==0.7.1"],
232234
model_serving_container_image_uri="us-docker.pkg.dev/vertex-ai/prediction/tf2-cpu.2-2:latest",
235+
233236
)
234237
235238
model = job.run(my_dataset,
@@ -309,6 +312,7 @@ Please visit `Importing models to Vertex AI`_ for a detailed overview:
309312

310313
.. _Importing models to Vertex AI: https://cloud.google.com/vertex-ai/docs/general/import-model
311314

315+
312316
Model Evaluation
313317
----------------
314318

@@ -413,6 +417,7 @@ To get predictions from endpoints:
413417
414418
endpoint.predict(instances=[[6.7, 3.1, 4.7, 1.5], [4.6, 3.1, 1.5, 0.2]])
415419
420+
416421
To undeploy models from an endpoint:
417422

418423
.. code-block:: Python
@@ -535,6 +540,7 @@ To use Explanation Metadata in endpoint deployment and model upload:
535540
aiplatform.Model.upload(..., explanation_metadata=explanation_metadata)
536541
537542
543+
538544
Cloud Profiler
539545
----------------------------
540546

gemini_docs/README.md

+11-16
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Vertex Generative AI SDK for Python
22
The Vertex Generative AI SDK helps developers use Google's generative AI
33
[Gemini models](http://cloud.google.com/vertex-ai/docs/generative-ai/multimodal/overview)
4+
and [PaLM language models](http://cloud.google.com/vertex-ai/docs/generative-ai/language-model-overview)
45
to build AI-powered features and applications.
56
The SDKs support use cases like the following:
67

@@ -24,13 +25,7 @@ For detailed instructions, see [quickstart](http://cloud.google.com/vertex-ai/do
2425

2526
#### Imports:
2627
```python
27-
import vertexai
28-
```
29-
30-
#### Initialization:
31-
32-
```python
33-
vertexai.init(project='my-project', location='us-central1')
28+
from vertexai.generative_models import GenerativeModel, Image, Content, Part, Tool, FunctionDeclaration, GenerationConfig
3429
```
3530

3631
#### Basic generation:
@@ -59,7 +54,7 @@ print(vision_model.generate_content(["What is in the video? ", video_part]))
5954
```
6055

6156
#### Chat
62-
```python
57+
```
6358
from vertexai.generative_models import GenerativeModel, Image
6459
vision_model = GenerativeModel("gemini-ultra-vision")
6560
vision_chat = vision_model.start_chat()
@@ -69,7 +64,7 @@ print(vision_chat.send_message("What things do I like?."))
6964
```
7065

7166
#### System instructions
72-
```python
67+
```
7368
from vertexai.generative_models import GenerativeModel
7469
model = GenerativeModel(
7570
"gemini-1.0-pro",
@@ -83,7 +78,7 @@ print(model.generate_content("Why is sky blue?"))
8378

8479
#### Function calling
8580

86-
```python
81+
```
8782
# First, create tools that the model is can use to answer your questions.
8883
# Describe a function by specifying it's schema (JsonSchema format)
8984
get_current_weather_func = generative_models.FunctionDeclaration(
@@ -137,7 +132,7 @@ print(chat.send_message(
137132

138133
#### Automatic Function calling
139134

140-
```python
135+
```
141136
from vertexai.preview.generative_models import GenerativeModel, Tool, FunctionDeclaration, AutomaticFunctionCallingResponder
142137
143138
# First, create functions that the model can use to answer your questions.
@@ -184,7 +179,7 @@ print(chat.send_message("What is the weather like in Boston?"))
184179

185180
- To perform bring-your-own-response(BYOR) evaluation, provide the model responses in the `response` column in the dataset. If a pairwise metric is used for BYOR evaluation, provide the baseline model responses in the `baseline_model_response` column.
186181

187-
```python
182+
```
188183
import pandas as pd
189184
from vertexai.evaluation import EvalTask, MetricPromptTemplateExamples
190185
@@ -208,7 +203,7 @@ eval_result = eval_task.evaluate(experiment_run_name="eval-experiment-run")
208203
```
209204
- To perform evaluation with Gemini model inference, specify the `model` parameter with a `GenerativeModel` instance. The input column name to the model is `prompt` and must be present in the dataset.
210205

211-
```python
206+
```
212207
from vertexai.evaluation import EvalTask
213208
from vertexai.generative_models import GenerativeModel
214209
@@ -228,7 +223,7 @@ result = EvalTask(
228223

229224
- If a `prompt_template` is specified, the `prompt` column is not required. Prompts can be assembled from the evaluation dataset, and all prompt template variable names must be present in the dataset columns.
230225

231-
```python
226+
```
232227
import pandas as pd
233228
from vertexai.evaluation import EvalTask, MetricPromptTemplateExamples
234229
from vertexai.generative_models import GenerativeModel
@@ -250,7 +245,7 @@ result = EvalTask(
250245
parameter with a custom inference function. The input column name to the
251246
custom inference function is `prompt` and must be present in the dataset.
252247

253-
```python
248+
```
254249
from openai import OpenAI
255250
from vertexai.evaluation import EvalTask, MetricPromptTemplateExamples
256251
@@ -284,7 +279,7 @@ the `baseline_model` input to a `PairwiseMetric` instance and the candidate
284279
`model` input to the `EvalTask.evaluate()` function. The input column name
285280
to both models is `prompt` and must be present in the dataset.
286281

287-
```python
282+
```
288283
import pandas as pd
289284
from vertexai.evaluation import EvalTask, MetricPromptTemplateExamples, PairwiseMetric
290285
from vertexai.generative_models import GenerativeModel

google/cloud/aiplatform/gapic_version.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
__version__ = "1.67.1" # {x-release-please-version}
16+
__version__ = "1.66.0" # {x-release-please-version}

google/cloud/aiplatform/tensorboard/uploader.py

-1
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,6 @@ def _pre_create_runs_and_time_series(self):
386386
if (run_name and run_name != ".")
387387
else uploader_utils.DEFAULT_RUN_NAME
388388
)
389-
run_name = uploader_utils.reformat_run_name(run_name)
390389
run_names.append(run_name)
391390
for event in events:
392391
_filter_graph_defs(event)

google/cloud/aiplatform/v1/schema/predict/instance/gapic_version.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
__version__ = "1.67.1" # {x-release-please-version}
16+
__version__ = "1.66.0" # {x-release-please-version}

google/cloud/aiplatform/v1/schema/predict/instance_v1/gapic_version.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
__version__ = "1.67.1" # {x-release-please-version}
16+
__version__ = "1.66.0" # {x-release-please-version}

google/cloud/aiplatform/v1/schema/predict/params/gapic_version.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
__version__ = "1.67.1" # {x-release-please-version}
16+
__version__ = "1.66.0" # {x-release-please-version}

google/cloud/aiplatform/v1/schema/predict/params_v1/gapic_version.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
__version__ = "1.67.1" # {x-release-please-version}
16+
__version__ = "1.66.0" # {x-release-please-version}

google/cloud/aiplatform/v1/schema/predict/prediction/gapic_version.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
__version__ = "1.67.1" # {x-release-please-version}
16+
__version__ = "1.66.0" # {x-release-please-version}

google/cloud/aiplatform/v1/schema/predict/prediction_v1/gapic_version.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
__version__ = "1.67.1" # {x-release-please-version}
16+
__version__ = "1.66.0" # {x-release-please-version}

google/cloud/aiplatform/v1/schema/trainingjob/definition/gapic_version.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
__version__ = "1.67.1" # {x-release-please-version}
16+
__version__ = "1.66.0" # {x-release-please-version}

google/cloud/aiplatform/v1/schema/trainingjob/definition_v1/gapic_version.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
__version__ = "1.67.1" # {x-release-please-version}
16+
__version__ = "1.66.0" # {x-release-please-version}

google/cloud/aiplatform/v1beta1/schema/predict/instance/gapic_version.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
__version__ = "1.67.1" # {x-release-please-version}
16+
__version__ = "1.66.0" # {x-release-please-version}

google/cloud/aiplatform/v1beta1/schema/predict/instance_v1beta1/gapic_version.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
__version__ = "1.67.1" # {x-release-please-version}
16+
__version__ = "1.66.0" # {x-release-please-version}

google/cloud/aiplatform/v1beta1/schema/predict/params/gapic_version.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
__version__ = "1.67.1" # {x-release-please-version}
16+
__version__ = "1.66.0" # {x-release-please-version}

google/cloud/aiplatform/v1beta1/schema/predict/params_v1beta1/gapic_version.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
__version__ = "1.67.1" # {x-release-please-version}
16+
__version__ = "1.66.0" # {x-release-please-version}

google/cloud/aiplatform/v1beta1/schema/predict/prediction/gapic_version.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
__version__ = "1.67.1" # {x-release-please-version}
16+
__version__ = "1.66.0" # {x-release-please-version}

0 commit comments

Comments
 (0)