fix: Fixed getting project ID when running on Vertex AI; Fixes #852#943
Merged
sasha-gitg merged 13 commits intogoogleapis:mainfrom Mar 21, 2022
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 https://github.com/googleapis/google-auth-library-python/issues/924 This PR fixes the fallback to get the project ID from the `CLOUD_ML_PROJECT_ID` environment variable.
vinnysenthil
suggested changes
Jan 10, 2022
4ecef80 to
5b63ac3
Compare
vinnysenthil
approved these changes
Feb 23, 2022
sasha-gitg
requested changes
Mar 4, 2022
Member
sasha-gitg
left a comment
There was a problem hiding this comment.
Please add a unit test that tests this block. Preferably, also an integration test that executes a custom job with the SDK.
sasha-gitg
requested changes
Mar 4, 2022
4 tasks
Contributor
f61d533 to
46f6324
Compare
Contributor
Author
|
I've switched to the new utility function. |
91373a0 to
692ae9e
Compare
235a6d1 to
1f79bce
Compare
Contributor
Author
I've added both a unit test and an integration test that executes a custom job with the SDK. |
620043b to
4f20ae0
Compare
Ark-kun
added a commit
to Ark-kun/pipeline_components
that referenced
this pull request
Aug 1, 2022
…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
Ark-kun
added a commit
to Ark-kun/pipeline_components
that referenced
this pull request
Aug 1, 2022
… - 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
Ark-kun
added a commit
to Ark-kun/pipeline_components
that referenced
this pull request
Aug 1, 2022
…- 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
Ark-kun
added a commit
to Ark-kun/pipeline_components
that referenced
this pull request
Aug 1, 2022
…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
Ark-kun
added a commit
to Ark-kun/pipeline_components
that referenced
this pull request
Aug 1, 2022
… - 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
Ark-kun
added a commit
to Ark-kun/pipeline_components
that referenced
this pull request
Aug 1, 2022
…- 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
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 🦕