Skip to content

Commit

Permalink
add init_auto
Browse files Browse the repository at this point in the history
  • Loading branch information
julieqiu committed Apr 26, 2024
1 parent e0f5601 commit 3c3c5b4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions google/cloud/aiplatform/initializer.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,11 @@ def __init__(self):
self._api_endpoint = None
self._api_transport = None

def init_auto(self, *):
project = os.environ.get("GOOGLE_CLOUD_PROJECT")
location = os.getenv("GOOGLE_CLOUD_REGION") or os.getenv("CLOUD_ML_REGION")
self.init(project=project, location=location)

def init(
self,
*,
Expand Down

0 comments on commit 3c3c5b4

Please sign in to comment.