-
Notifications
You must be signed in to change notification settings - Fork 348
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: Fixed getting project ID when running on Vertex AI; Fixes #852 #943
fix: Fixed getting project ID when running on Vertex AI; Fixes #852 #943
Conversation
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.
4ecef80
to
5b63ac3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a unit test that tests this block. Preferably, also an integration test that executes a custom job with the SDK.
f61d533
to
46f6324
Compare
I've switched to the new utility function. |
91373a0
to
692ae9e
Compare
235a6d1
to
1f79bce
Compare
I've added both a unit test and an integration test that executes a custom job with the SDK. |
620043b
to
4f20ae0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Alexey!
…Simplified the component after my Vertex SDK fixes were merged Some of my Vertex SDK fixes: googleapis/python-aiplatform#779 googleapis/python-aiplatform#882 googleapis/python-aiplatform#943 googleapis/python-aiplatform#997
… - Simplified the component after my Vertex SDK fixes were merged Some of my Vertex SDK fixes: googleapis/python-aiplatform#779 googleapis/python-aiplatform#882 googleapis/python-aiplatform#943 googleapis/python-aiplatform#997
…- Simplified the component after my Vertex SDK fixes were merged Some of my Vertex SDK fixes: googleapis/python-aiplatform#779 googleapis/python-aiplatform#882 googleapis/python-aiplatform#943 googleapis/python-aiplatform#997
…Simplified the component after my Vertex SDK fixes were merged Some of my Vertex SDK fixes: googleapis/python-aiplatform#779 googleapis/python-aiplatform#882 googleapis/python-aiplatform#943 googleapis/python-aiplatform#997
… - Simplified the component after my Vertex SDK fixes were merged Some of my Vertex SDK fixes: googleapis/python-aiplatform#779 googleapis/python-aiplatform#882 googleapis/python-aiplatform#943 googleapis/python-aiplatform#997
…- Simplified the component after my Vertex SDK fixes were merged Some of my Vertex SDK fixes: googleapis/python-aiplatform#779 googleapis/python-aiplatform#882 googleapis/python-aiplatform#943 googleapis/python-aiplatform#997
Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:
Fixes #852 🦕