-
Notifications
You must be signed in to change notification settings - Fork 331
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
The SDK does not pick up the correct user project when running on Vertex Pipelines or CustomJobs #852
Labels
api: aiplatform
Issues related to the AI Platform API.
priority: p2
Moderately-important priority. Fix may not be included in next release.
Comments
product-auto-label
bot
added
the
api: aiplatform
Issues related to the AI Platform API.
label
Nov 18, 2021
yoshi-automation
added
triage me
I really want to be triaged.
🚨
This issue needs some love.
labels
Nov 23, 2021
Ark-kun
added a commit
to Ark-kun/python-aiplatform
that referenced
this issue
Jan 6, 2022
When project ID is not explicitly specified in `aiplatform.init()` call, the SDK uses `google.auth.default()` to infer the project ID. However when running under Vertex AI (CustomJob, PipelineJob), the project returned by `google.auth.default()` is not the correct user project. See googleapis#852 See googleapis/google-auth-library-python#924 This PR fixes the fallback to get the project ID from the `CLOUD_ML_PROJECT_ID` environment variable.
4 tasks
kweinmeister
added
priority: p2
Moderately-important priority. Fix may not be included in next release.
and removed
🚨
This issue needs some love.
triage me
I really want to be triaged.
labels
Feb 1, 2022
4 tasks
I'm not sure this issue is fixed. |
/reopen |
sasha-gitg
pushed a commit
that referenced
this issue
Mar 21, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
api: aiplatform
Issues related to the AI Platform API.
priority: p2
Moderately-important priority. Fix may not be included in next release.
Usually the Vertex SDK gets the project ID automatically (by calling
google.auth.default()
). This works when running on Kubeflow Pipelines.However when running on Vertex Pipelines or CustomJobs, the detected project is not the user project and is not usable.
This leads to failure when trying to create any resource in the project:
Fortunately there is a way to get project number from the Vertex environment. There is also a way to get project ID from the project number.
Deducing project number
Getting project ID:
Perhaps we should improve the Vertex SDK initializer to use the project mentioned in
CLOUD_ML_PROJECT_ID
if it's available by default.The text was updated successfully, but these errors were encountered: