Skip to content

Commit

Permalink
move aiplatform import to avoid unknown import error
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenwashington committed Jun 17, 2024
1 parent 7d7b746 commit d384374
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/integration/test_beans_training_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,6 @@ def pipeline(bq_table: str,

def test_beans_training_model():
# Importing here to avoid conflict with repeated import in deploy_model
from google.cloud import aiplatform

project_id = os.environ.get('PROJECT_ID')
model_id = 'dry-beans-dt'
Expand Down Expand Up @@ -213,6 +212,8 @@ def test_beans_training_model():
helpers.assert_successful_provisioning(defaults)

# Assert that Vertex AI endpoint was created and returns predictions.

from google.cloud import aiplatform
aiplatform.init(project=project_id)
endpoints = aiplatform.Endpoint.list()
endpoint_name = endpoints[0].resource_name
Expand Down

0 comments on commit d384374

Please sign in to comment.