GeezerVison is showing github.com — feat: add support for partial failures sink in import rag files. · googleapis/python-aiplatform@8070411
File treeExpand file treeCollapse file tree Open diff view settings services/prediction_service
pypi/_vertex_ai_placeholder samples/generated_samples
Some content is hiddenLarge Commits have some content hidden by default. Use the searchbox below for content that may be hidden. Dismiss bannerExpand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: .kokoro/release.sh +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -23,7 +23,7 @@ python3 -m releasetool publish-reporter-script > /tmp/publisher-script; source / | 23 | 23 | export PYTHONUNBUFFERED=1 | 24 | 24 |
| 25 | 25 | # 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") | 27 | 27 | cd github/python-aiplatform | 28 | 28 | python3 setup.py sdist bdist_wheel | 29 | 29 | twine upload --username __token__ --password "${GCA_TWINE_PASSWORD}" dist/* | |
Collapse file Copy file name to clipboardExpand all lines: .kokoro/release/common.cfg +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -28,7 +28,7 @@ before_action { | 28 | 28 | fetch_keystore { | 29 | 29 | keystore_resource { | 30 | 30 | keystore_config_id: 73713 | 31 | | - keyname: "google-cloud-pypi-token-keystore-2" | | 31 | + keyname: "google-cloud-pypi-token-keystore-1" | 32 | 32 | } | 33 | 33 | } | 34 | 34 | } | |
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 | { | 2 | | - ".": "1.67.1" | | 2 | + ".": "1.66.0" | 3 | 3 | } |
Collapse file Copy file name to clipboardExpand all lines: CHANGELOG.md -30Lines changed: 0 additions & 30 deletions - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
| 1 | 1 | # Changelog | 2 | 2 |
| 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 | | - | 33 | 3 | ## [1.66.0](https://github.com/googleapis/python-aiplatform/compare/v1.65.0...v1.66.0) (2024-09-11) | 34 | 4 |
| 35 | 5 |
| |
Collapse file Copy file name to clipboardExpand all lines: README.rst +12-4Lines changed: 12 additions & 4 deletions - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
@@ -3,10 +3,6 @@ Vertex AI SDK for Python | 3 | 3 |
| 4 | 4 | |GA| |pypi| |versions| |unit-tests| |system-tests| |sample-tests| | 5 | 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 | 10 | 6 |
| 11 | 7 | `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. | 12 | 8 |
| @@ -117,6 +113,18 @@ Vertex AI SDK resource based functionality can be used by importing the followin | 117 | 113 |
| 118 | 114 | from google.cloud import aiplatform | 119 | 115 |
| | 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 | +
| 120 | 128 | Initialization | 121 | 129 | ^^^^^^^^^^^^^^ | 122 | 130 | Initialize the SDK to store common configurations that you use with the SDK. | |
Collapse file Copy file name to clipboardExpand all lines: docs/README.rst +22-16Lines changed: 22 additions & 16 deletions - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
| 1 | 1 | Vertex AI SDK for Python | 2 | 2 | ================================================= | 3 | 3 |
| 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| | 10 | 5 |
| 11 | 6 | `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. | 12 | 7 |
| @@ -19,16 +14,11 @@ Vertex AI SDK for Python | 19 | 14 | :target: https://pypi.org/project/google-cloud-aiplatform/ | 20 | 15 | .. |versions| image:: https://img.shields.io/pypi/pyversions/google-cloud-aiplatform.svg | 21 | 16 | :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 | 28 | 17 | .. _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 | 30 | 19 | .. _Product Documentation: https://cloud.google.com/vertex-ai/docs | 31 | 20 |
| | 21 | + | 32 | 22 | Quick Start | 33 | 23 | ----------- | 34 | 24 |
| @@ -69,6 +59,7 @@ Mac/Linux | 69 | 59 | <your-env>/bin/pip install google-cloud-aiplatform | 70 | 60 |
| 71 | 61 |
| | 62 | +
| 72 | 63 | Windows | 73 | 64 | ^^^^^^^ | 74 | 65 |
| @@ -79,7 +70,6 @@ Windows | 79 | 70 | <your-env>\Scripts\activate | 80 | 71 | <your-env>\Scripts\pip.exe install google-cloud-aiplatform | 81 | 72 |
| 82 | | -
| 83 | 73 | Supported Python Versions | 84 | 74 | ^^^^^^^^^^^^^^^^^^^^^^^^^ | 85 | 75 | Python >= 3.8 | @@ -117,6 +107,18 @@ Vertex AI SDK resource based functionality can be used by importing the followin | 117 | 107 |
| 118 | 108 | from google.cloud import aiplatform | 119 | 109 |
| | 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 | +
| 120 | 122 | Initialization | 121 | 123 | ^^^^^^^^^^^^^^ | 122 | 124 | 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: | 173 | 175 | my_dataset = aiplatform.TextDataset.create( | 174 | 176 | display_name="my-dataset") | 175 | 177 |
| 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'] | 178 | 180 | import_schema_uri=aiplatform.schema.dataset.ioformat.text.multi_label_classification | 179 | 181 | ) | 180 | 182 |
| @@ -230,6 +232,7 @@ It must write the model artifact to the environment variable populated by the tr | 230 | 232 | container_uri="us-docker.pkg.dev/vertex-ai/training/tf-cpu.2-2:latest", | 231 | 233 | requirements=["gcsfs==0.7.1"], | 232 | 234 | model_serving_container_image_uri="us-docker.pkg.dev/vertex-ai/prediction/tf2-cpu.2-2:latest", | | 235 | +
| 233 | 236 | ) | 234 | 237 |
| 235 | 238 | model = job.run(my_dataset, | @@ -309,6 +312,7 @@ Please visit `Importing models to Vertex AI`_ for a detailed overview: | 309 | 312 |
| 310 | 313 | .. _Importing models to Vertex AI: https://cloud.google.com/vertex-ai/docs/general/import-model | 311 | 314 |
| | 315 | + | 312 | 316 | Model Evaluation | 313 | 317 | ---------------- | 314 | 318 |
| @@ -413,6 +417,7 @@ To get predictions from endpoints: | 413 | 417 |
| 414 | 418 | endpoint.predict(instances=[[6.7, 3.1, 4.7, 1.5], [4.6, 3.1, 1.5, 0.2]]) | 415 | 419 |
| | 420 | +
| 416 | 421 | To undeploy models from an endpoint: | 417 | 422 |
| 418 | 423 | .. code-block:: Python | @@ -535,6 +540,7 @@ To use Explanation Metadata in endpoint deployment and model upload: | 535 | 540 | aiplatform.Model.upload(..., explanation_metadata=explanation_metadata) | 536 | 541 |
| 537 | 542 |
| | 543 | +
| 538 | 544 | Cloud Profiler | 539 | 545 | ---------------------------- | 540 | 546 |
| |
Collapse file Copy file name to clipboardExpand all lines: gemini_docs/README.md +11-16Lines changed: 11 additions & 16 deletions - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
| 1 | 1 | # Vertex Generative AI SDK for Python | 2 | 2 | The Vertex Generative AI SDK helps developers use Google's generative AI | 3 | 3 | [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) | 4 | 5 | to build AI-powered features and applications. | 5 | 6 | The SDKs support use cases like the following: | 6 | 7 |
| @@ -24,13 +25,7 @@ For detailed instructions, see [quickstart](http://cloud.google.com/vertex-ai/do | 24 | 25 |
| 25 | 26 | #### Imports: | 26 | 27 | ```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 | 34 | 29 | ``` | 35 | 30 |
| 36 | 31 | #### Basic generation: | @@ -59,7 +54,7 @@ print(vision_model.generate_content(["What is in the video? ", video_part])) | 59 | 54 | ``` | 60 | 55 |
| 61 | 56 | #### Chat | 62 | | -```python | | 57 | +``` | 63 | 58 | from vertexai.generative_models import GenerativeModel, Image | 64 | 59 | vision_model = GenerativeModel("gemini-ultra-vision") | 65 | 60 | vision_chat = vision_model.start_chat() | @@ -69,7 +64,7 @@ print(vision_chat.send_message("What things do I like?.")) | 69 | 64 | ``` | 70 | 65 |
| 71 | 66 | #### System instructions | 72 | | -```python | | 67 | +``` | 73 | 68 | from vertexai.generative_models import GenerativeModel | 74 | 69 | model = GenerativeModel( | 75 | 70 | "gemini-1.0-pro", | @@ -83,7 +78,7 @@ print(model.generate_content("Why is sky blue?")) | 83 | 78 |
| 84 | 79 | #### Function calling | 85 | 80 |
| 86 | | -```python | | 81 | +``` | 87 | 82 | # First, create tools that the model is can use to answer your questions. | 88 | 83 | # Describe a function by specifying it's schema (JsonSchema format) | 89 | 84 | get_current_weather_func = generative_models.FunctionDeclaration( | @@ -137,7 +132,7 @@ print(chat.send_message( | 137 | 132 |
| 138 | 133 | #### Automatic Function calling | 139 | 134 |
| 140 | | -```python | | 135 | +``` | 141 | 136 | from vertexai.preview.generative_models import GenerativeModel, Tool, FunctionDeclaration, AutomaticFunctionCallingResponder | 142 | 137 |
| 143 | 138 | # 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?")) | 184 | 179 |
| 185 | 180 | - 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. | 186 | 181 |
| 187 | | -```python | | 182 | +``` | 188 | 183 | import pandas as pd | 189 | 184 | from vertexai.evaluation import EvalTask, MetricPromptTemplateExamples | 190 | 185 |
| @@ -208,7 +203,7 @@ eval_result = eval_task.evaluate(experiment_run_name="eval-experiment-run") | 208 | 203 | ``` | 209 | 204 | - 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. | 210 | 205 |
| 211 | | -```python | | 206 | +``` | 212 | 207 | from vertexai.evaluation import EvalTask | 213 | 208 | from vertexai.generative_models import GenerativeModel | 214 | 209 |
| @@ -228,7 +223,7 @@ result = EvalTask( | 228 | 223 |
| 229 | 224 | - 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. | 230 | 225 |
| 231 | | -```python | | 226 | +``` | 232 | 227 | import pandas as pd | 233 | 228 | from vertexai.evaluation import EvalTask, MetricPromptTemplateExamples | 234 | 229 | from vertexai.generative_models import GenerativeModel | @@ -250,7 +245,7 @@ result = EvalTask( | 250 | 245 | parameter with a custom inference function. The input column name to the | 251 | 246 | custom inference function is `prompt` and must be present in the dataset. | 252 | 247 |
| 253 | | -```python | | 248 | +``` | 254 | 249 | from openai import OpenAI | 255 | 250 | from vertexai.evaluation import EvalTask, MetricPromptTemplateExamples | 256 | 251 |
| @@ -284,7 +279,7 @@ the `baseline_model` input to a `PairwiseMetric` instance and the candidate | 284 | 279 | `model` input to the `EvalTask.evaluate()` function. The input column name | 285 | 280 | to both models is `prompt` and must be present in the dataset. | 286 | 281 |
| 287 | | -```python | | 282 | +``` | 288 | 283 | import pandas as pd | 289 | 284 | from vertexai.evaluation import EvalTask, MetricPromptTemplateExamples, PairwiseMetric | 290 | 285 | from vertexai.generative_models import GenerativeModel | |
Collapse file Copy file name to clipboardExpand all lines: google/cloud/aiplatform/gapic_version.py +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
| 13 | 13 | # See the License for the specific language governing permissions and | 14 | 14 | # limitations under the License. | 15 | 15 | # | 16 | | -__version__ = "1.67.1" # {x-release-please-version} | | 16 | +__version__ = "1.66.0" # {x-release-please-version} |
Collapse file Copy file name to clipboardExpand all lines: google/cloud/aiplatform/tensorboard/uploader.py -1Lines changed: 0 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -386,7 +386,6 @@ def _pre_create_runs_and_time_series(self): | 386 | 386 | if (run_name and run_name != ".") | 387 | 387 | else uploader_utils.DEFAULT_RUN_NAME | 388 | 388 | ) | 389 | | - run_name = uploader_utils.reformat_run_name(run_name) | 390 | 389 | run_names.append(run_name) | 391 | 390 | for event in events: | 392 | 391 | _filter_graph_defs(event) | |
Collapse file Copy file name to clipboardExpand all lines: google/cloud/aiplatform/v1/schema/predict/instance/gapic_version.py +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
| 13 | 13 | # See the License for the specific language governing permissions and | 14 | 14 | # limitations under the License. | 15 | 15 | # | 16 | | -__version__ = "1.67.1" # {x-release-please-version} | | 16 | +__version__ = "1.66.0" # {x-release-please-version} |
|