Fix PrivateEndpoint.raw_predict parameter name #6107
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #6101
Description
Fixed
TypeErrorinPrivateEndpoint.raw_predict()caused by incorrect parameter name when callingAuthorizedSession.post().Problem
When calling
PrivateEndpoint.raw_predict()with PSC (Private Service Connect) based endpoints, the method crashed with:Root Cause
The google-auth-transport library updated its API, changing the parameter name from
bodytodataforAuthorizedSession.post().The
Endpoint.raw_predict()method was updated to usedata, butPrivateEndpoint.raw_predict()was missed and still usedbody.Changes
File:
google/cloud/aiplatform/models.pyLine: 4153
Changed:
To:
Testing
This fix aligns
PrivateEndpoint.raw_predict()with the already-correctedEndpoint.raw_predict()implementation (line 2744), which usesdata=body.The issue reporter confirmed the fix resolves the crash when calling
raw_predict()on PSC-based PrivateEndpoint instances.