Skip to content
Open
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
5 changes: 3 additions & 2 deletions google/cloud/aiplatform/vertex_ray/util/_validation_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
from google.cloud.aiplatform import initializer
from google.cloud.aiplatform.utils import resource_manager_utils

_auth_req = google.auth.transport.requests.Request()

SUPPORTED_RAY_VERSIONS = immutabledict(
{"2.9": "2.9.3", "2.33": "2.33.0", "2.42": "2.42.0", "2.47": "2.47.1"}
)
Expand Down Expand Up @@ -167,6 +169,5 @@ def get_bearer_token():

# creds.valid is False, and creds.token is None
# Need to refresh credentials to populate those
auth_req = google.auth.transport.requests.Request()
creds.refresh(auth_req)
creds.refresh(_auth_req)
return creds.token