File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1919
2020import pytest
2121
22- from google import auth as google_auth
2322from google .cloud import aiplatform
2423from google .cloud import storage
2524
2625from tests .system .aiplatform import e2e_base
2726
28- # TODO(vinnys): Replace with env var `BUILD_SPECIFIC_GCP_PROJECT` once supported
29- _ , _TEST_PROJECT = google_auth .default ()
30- _TEST_LOCATION = "us-central1"
3127
3228_XGBOOST_MODEL_URI = "gs://cloud-samples-data-us-central1/vertex-ai/google-cloud-aiplatform-ci-artifacts/models/iris_xgboost/model.bst"
3329
3430
3531@pytest .mark .usefixtures ("delete_staging_bucket" )
3632class TestModel (e2e_base .TestEndToEnd ):
37- _temp_prefix = f"{ _TEST_PROJECT } -vertex-staging-{ _TEST_LOCATION } "
33+
34+ _temp_prefix = "temp_vertex_sdk_e2e_model_upload_test"
3835
3936 def test_upload_and_deploy_xgboost_model (self , shared_state ):
4037 """Upload XGBoost model from local file and deploy it for prediction. Additionally, update model name, description and labels"""
4138
42- aiplatform .init (project = _TEST_PROJECT , location = _TEST_LOCATION )
39+ aiplatform .init (
40+ project = e2e_base ._PROJECT , location = e2e_base ._LOCATION ,
41+ )
4342
44- storage_client = storage .Client (project = _TEST_PROJECT )
43+ storage_client = storage .Client (project = e2e_base . _PROJECT )
4544 model_blob = storage .Blob .from_string (
4645 uri = _XGBOOST_MODEL_URI , client = storage_client
4746 )
You can’t perform that action at this time.
0 commit comments