Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "1.139.0"
".": "1.138.0"
}
8 changes: 0 additions & 8 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
# Changelog

## [1.139.0](https://github.com/googleapis/python-aiplatform/compare/v1.138.0...v1.139.0) (2026-02-24)


### Features

* Add `max_concurrent_active_run_count` support to Scheduled Pipelines client GA. ([a204e74](https://github.com/googleapis/python-aiplatform/commit/a204e742a5bf398cd65f47508c04500432d3d884))
* GenAI Client(evals) - update SDK type definitions for Agent Data ([6ac28a5](https://github.com/googleapis/python-aiplatform/commit/6ac28a546218feb6c3cd1d29f36cd9e980eba778))

## [1.138.0](https://github.com/googleapis/python-aiplatform/compare/v1.137.0...v1.138.0) (2026-02-17)


Expand Down
2 changes: 1 addition & 1 deletion google/cloud/aiplatform/gapic_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
__version__ = "1.139.0" # {x-release-please-version}
__version__ = "1.138.0" # {x-release-please-version}
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
__version__ = "1.139.0" # {x-release-please-version}
__version__ = "1.138.0" # {x-release-please-version}
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
__version__ = "1.139.0" # {x-release-please-version}
__version__ = "1.138.0" # {x-release-please-version}
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
__version__ = "1.139.0" # {x-release-please-version}
__version__ = "1.138.0" # {x-release-please-version}
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
__version__ = "1.139.0" # {x-release-please-version}
__version__ = "1.138.0" # {x-release-please-version}
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
__version__ = "1.139.0" # {x-release-please-version}
__version__ = "1.138.0" # {x-release-please-version}
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
__version__ = "1.139.0" # {x-release-please-version}
__version__ = "1.138.0" # {x-release-please-version}
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
__version__ = "1.139.0" # {x-release-please-version}
__version__ = "1.138.0" # {x-release-please-version}
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
__version__ = "1.139.0" # {x-release-please-version}
__version__ = "1.138.0" # {x-release-please-version}
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
__version__ = "1.139.0" # {x-release-please-version}
__version__ = "1.138.0" # {x-release-please-version}
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
__version__ = "1.139.0" # {x-release-please-version}
__version__ = "1.138.0" # {x-release-please-version}
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
__version__ = "1.139.0" # {x-release-please-version}
__version__ = "1.138.0" # {x-release-please-version}
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
__version__ = "1.139.0" # {x-release-please-version}
__version__ = "1.138.0" # {x-release-please-version}
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
__version__ = "1.139.0" # {x-release-please-version}
__version__ = "1.138.0" # {x-release-please-version}
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
__version__ = "1.139.0" # {x-release-please-version}
__version__ = "1.138.0" # {x-release-please-version}
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
__version__ = "1.139.0" # {x-release-please-version}
__version__ = "1.138.0" # {x-release-please-version}
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
__version__ = "1.139.0" # {x-release-please-version}
__version__ = "1.138.0" # {x-release-please-version}
2 changes: 1 addition & 1 deletion google/cloud/aiplatform/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@
# limitations under the License.
#

__version__ = "1.139.0"
__version__ = "1.138.0"
2 changes: 1 addition & 1 deletion google/cloud/aiplatform_v1/gapic_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
__version__ = "1.139.0" # {x-release-please-version}
__version__ = "1.138.0" # {x-release-please-version}
2 changes: 1 addition & 1 deletion google/cloud/aiplatform_v1beta1/gapic_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
__version__ = "1.139.0" # {x-release-please-version}
__version__ = "1.138.0" # {x-release-please-version}
2 changes: 1 addition & 1 deletion pypi/_vertex_ai_placeholder/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@
# limitations under the License.
#

__version__ = "1.139.0"
__version__ = "1.138.0"
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
],
"language": "PYTHON",
"name": "google-cloud-aiplatform",
"version": "1.139.0"
"version": "1.138.0"
},
"snippets": [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
],
"language": "PYTHON",
"name": "google-cloud-aiplatform",
"version": "1.139.0"
"version": "1.138.0"
},
"snippets": [
{
Expand Down
77 changes: 77 additions & 0 deletions vertexai/_genai/_evals_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,80 @@ def _extract_contents_for_inference(
return request_dict_or_raw_text


def _resolve_dataset(
api_client: BaseApiClient,
dataset: Union[types.EvaluationRunDataSource, types.EvaluationDataset],
dest: str,
agent_info_pydantic: Optional[types.evals.AgentInfo] = None,
) -> types.EvaluationRunDataSource:
"""Resolves dataset for the evaluation run."""
if isinstance(dataset, types.EvaluationDataset):
candidate_name = _get_candidate_name(dataset, agent_info_pydantic)
eval_set = _create_evaluation_set_from_dataframe(
api_client,
dest,
dataset.eval_dataset_df,
candidate_name,
)
dataset = types.EvaluationRunDataSource(evaluation_set=eval_set.name)
return dataset


def _resolve_inference_configs(
inference_configs: Optional[
dict[str, types.EvaluationRunInferenceConfigOrDict]
] = None,
agent_info_pydantic: Optional[types.evals.AgentInfo] = None,
) -> Optional[dict[str, types.EvaluationRunInferenceConfigOrDict]]:
"""Resolves inference configs for the evaluation run."""
if agent_info_pydantic and agent_info_pydantic.name:
inference_configs = {}
inference_configs[agent_info_pydantic.name] = (
types.EvaluationRunInferenceConfig(
agent_config=types.EvaluationRunAgentConfig(
developer_instruction=genai_types.Content(
parts=[genai_types.Part(text=agent_info_pydantic.instruction)]
),
tools=agent_info_pydantic.tool_declarations,
)
)
)
return inference_configs


def _add_evaluation_run_labels(
labels: Optional[dict[str, str]] = None,
agent_info_pydantic: Optional[types.evals.AgentInfo] = None,
) -> Optional[dict[str, str]]:
"""Adds labels to the evaluation run."""
if agent_info_pydantic and agent_info_pydantic.agent_resource_name:
labels = labels or {}
labels["vertex-ai-evaluation-agent-engine-id"] = (
agent_info_pydantic.agent_resource_name.split("reasoningEngines/")[-1]
)
return labels


def _get_candidate_name(
dataset: types.EvaluationDataset,
agent_info_pydantic: Optional[types.evals.AgentInfo] = None,
) -> Optional[str]:
"""Internal helper to get candidate name."""
if agent_info_pydantic is not None and (
dataset.candidate_name
and agent_info_pydantic
and agent_info_pydantic.name
and dataset.candidate_name != agent_info_pydantic.name
):
logger.warning(
"Evaluation dataset candidate_name and agent_info.name are different."
" Please make sure this is intended."
)
elif dataset.candidate_name is None and agent_info_pydantic:
return agent_info_pydantic.name
return dataset.candidate_name or None


def _execute_inference_concurrently(
api_client: BaseApiClient,
prompt_dataset: pd.DataFrame,
Expand Down Expand Up @@ -1858,6 +1932,9 @@ def _object_to_dict(obj: Any) -> Union[dict[str, Any], Any]:
result[key] = value
elif isinstance(value, (list, tuple)):
result[key] = [_object_to_dict(item) for item in value]
# Add recursive handling for dictionaries
elif isinstance(value, dict):
result[key] = {k: _object_to_dict(v) for k, v in value.items()}
elif isinstance(value, bytes):
result[key] = base64.b64encode(value).decode("utf-8")
elif hasattr(value, "__dict__"): # Nested object
Expand Down
Loading
Loading