Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: prediction stream raw predict url for non dedicated endpoint #4955

Merged
merged 1 commit into from
Feb 13, 2025
Merged
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
3 changes: 2 additions & 1 deletion google/cloud/aiplatform/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -2583,6 +2583,7 @@ def stream_raw_predict(
timeout: Optional[float] = None,
) -> Iterator[requests.models.Response]:
"""Makes a streaming prediction request using arbitrary headers.
For custom model, this method is only supported for dedicated endpoint.

Example usage:
```
Expand Down Expand Up @@ -2632,7 +2633,7 @@ def stream_raw_predict(
if self.stream_raw_predict_request_url is None:
self.stream_raw_predict_request_url = f"https://{self.location}-{constants.base.API_BASE_PATH}/v1/projects/{self.project}/locations/{self.location}/endpoints/{self.name}:streamRawPredict"

url = self.raw_predict_request_url
url = self.stream_raw_predict_request_url

if use_dedicated_endpoint:
self._sync_gca_resource_if_skipped()
Expand Down