File tree 1 file changed +6
-7
lines changed
1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change 19
19
20
20
import pytest
21
21
22
- from google import auth as google_auth
23
22
from google .cloud import aiplatform
24
23
from google .cloud import storage
25
24
26
25
from tests .system .aiplatform import e2e_base
27
26
28
- # TODO(vinnys): Replace with env var `BUILD_SPECIFIC_GCP_PROJECT` once supported
29
- _ , _TEST_PROJECT = google_auth .default ()
30
- _TEST_LOCATION = "us-central1"
31
27
32
28
_XGBOOST_MODEL_URI = "gs://cloud-samples-data-us-central1/vertex-ai/google-cloud-aiplatform-ci-artifacts/models/iris_xgboost/model.bst"
33
29
34
30
35
31
@pytest .mark .usefixtures ("delete_staging_bucket" )
36
32
class 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"
38
35
39
36
def test_upload_and_deploy_xgboost_model (self , shared_state ):
40
37
"""Upload XGBoost model from local file and deploy it for prediction. Additionally, update model name, description and labels"""
41
38
42
- aiplatform .init (project = _TEST_PROJECT , location = _TEST_LOCATION )
39
+ aiplatform .init (
40
+ project = e2e_base ._PROJECT , location = e2e_base ._LOCATION ,
41
+ )
43
42
44
- storage_client = storage .Client (project = _TEST_PROJECT )
43
+ storage_client = storage .Client (project = e2e_base . _PROJECT )
45
44
model_blob = storage .Blob .from_string (
46
45
uri = _XGBOOST_MODEL_URI , client = storage_client
47
46
)
You can’t perform that action at this time.
0 commit comments