Skip to content

Commit

Permalink
Reverted skips
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanmkc committed May 2, 2022
1 parent 847eb30 commit 528a915
Show file tree
Hide file tree
Showing 8 changed files with 40 additions and 29 deletions.
1 change: 0 additions & 1 deletion tests/system/aiplatform/e2e_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
import os
import pytest
import uuid
import subprocess

from typing import Any, Dict, Generator

Expand Down
1 change: 0 additions & 1 deletion tests/system/aiplatform/test_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@
_TEST_IMAGE_OBJ_DET_IMPORT_SCHEMA = "gs://google-cloud-aiplatform/schema/dataset/ioformat/image_bounding_box_io_format_1.0.0.yaml"


@pytest.mark.skip(reason="Debug")
class TestDataset:
def setup_method(self):
importlib.reload(initializer)
Expand Down
1 change: 0 additions & 1 deletion tests/system/aiplatform/test_e2e_tabular.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@
}


@pytest.mark.skip(reason="Debug")
@pytest.mark.usefixtures("prepare_staging_bucket", "delete_staging_bucket")
class TestEndToEndTabular(e2e_base.TestEndToEnd):
"""End to end system test of the Vertex SDK with tabular data adapted from
Expand Down
46 changes: 30 additions & 16 deletions tests/system/aiplatform/test_featurestore.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@
_TEST_MOVIE_AVERAGE_RATING_FEATURE_ID = "average_rating"


@pytest.mark.skip(reason="Debug")
@pytest.mark.usefixtures(
"prepare_staging_bucket",
"delete_staging_bucket",
Expand All @@ -59,7 +58,8 @@ class TestFeaturestore(e2e_base.TestEndToEnd):

def test_create_get_list_featurestore(self, shared_state):
aiplatform.init(
project=e2e_base._PROJECT, location=e2e_base._LOCATION,
project=e2e_base._PROJECT,
location=e2e_base._LOCATION,
)

featurestore_id = self._make_display_name(key=_TEST_FEATURESTORE_ID).replace(
Expand Down Expand Up @@ -92,7 +92,8 @@ def test_create_get_list_entity_types(self, shared_state):
featurestore_name = shared_state["featurestore_name"]

aiplatform.init(
project=e2e_base._PROJECT, location=e2e_base._LOCATION,
project=e2e_base._PROJECT,
location=e2e_base._LOCATION,
)

# Users
Expand Down Expand Up @@ -135,7 +136,8 @@ def test_create_get_list_features(self, shared_state):
user_entity_type_name = shared_state["user_entity_type_name"]

aiplatform.init(
project=e2e_base._PROJECT, location=e2e_base._LOCATION,
project=e2e_base._PROJECT,
location=e2e_base._LOCATION,
)

# User Features
Expand Down Expand Up @@ -165,7 +167,8 @@ def test_create_get_list_features(self, shared_state):
)

user_liked_genres_feature = user_entity_type.create_feature(
feature_id=_TEST_USER_LIKED_GENRES_FEATURE_ID, value_type="STRING_ARRAY",
feature_id=_TEST_USER_LIKED_GENRES_FEATURE_ID,
value_type="STRING_ARRAY",
)
shared_state[
"user_liked_genres_feature_resource_name"
Expand Down Expand Up @@ -199,7 +202,8 @@ def test_ingest_feature_values(self, shared_state, caplog):
caplog.set_level(logging.INFO)

aiplatform.init(
project=e2e_base._PROJECT, location=e2e_base._LOCATION,
project=e2e_base._PROJECT,
location=e2e_base._LOCATION,
)

user_entity_type.ingest_from_gcs(
Expand All @@ -224,7 +228,8 @@ def test_batch_create_features(self, shared_state):
movie_entity_type = shared_state["movie_entity_type"]

aiplatform.init(
project=e2e_base._PROJECT, location=e2e_base._LOCATION,
project=e2e_base._PROJECT,
location=e2e_base._LOCATION,
)

movie_feature_configs = {
Expand Down Expand Up @@ -266,13 +271,15 @@ def test_ingest_feature_values_from_df_using_feature_time_column_and_online_read
caplog.set_level(logging.INFO)

aiplatform.init(
project=e2e_base._PROJECT, location=e2e_base._LOCATION,
project=e2e_base._PROJECT,
location=e2e_base._LOCATION,
)

read_feature_ids = ["average_rating", "title", "genres"]

movie_entity_views_df_before_ingest = movie_entity_type.read(
entity_ids=["movie_01", "movie_02"], feature_ids=read_feature_ids,
entity_ids=["movie_01", "movie_02"],
feature_ids=read_feature_ids,
)
expected_data_before_ingest = [
{
Expand Down Expand Up @@ -330,7 +337,8 @@ def test_ingest_feature_values_from_df_using_feature_time_column_and_online_read
)

movie_entity_views_df_after_ingest = movie_entity_type.read(
entity_ids=["movie_01", "movie_02"], feature_ids=read_feature_ids,
entity_ids=["movie_01", "movie_02"],
feature_ids=read_feature_ids,
)
expected_data_after_ingest = [
{
Expand Down Expand Up @@ -366,7 +374,8 @@ def test_ingest_feature_values_from_df_using_feature_time_datetime_and_online_re
caplog.set_level(logging.INFO)

aiplatform.init(
project=e2e_base._PROJECT, location=e2e_base._LOCATION,
project=e2e_base._PROJECT,
location=e2e_base._LOCATION,
)

movies_df = pd.DataFrame(
Expand Down Expand Up @@ -406,7 +415,8 @@ def test_ingest_feature_values_from_df_using_feature_time_datetime_and_online_re
)

movie_entity_views_df_avg_rating = movie_entity_type.read(
entity_ids="movie_04", feature_ids="average_rating",
entity_ids="movie_04",
feature_ids="average_rating",
)
expected_data_avg_rating = [
{"movie_id": "movie_04", "average_rating": 4.6},
Expand All @@ -426,7 +436,8 @@ def test_ingest_feature_values_from_df_using_feature_time_datetime_and_online_re
def test_search_features(self, shared_state):

aiplatform.init(
project=e2e_base._PROJECT, location=e2e_base._LOCATION,
project=e2e_base._PROJECT,
location=e2e_base._LOCATION,
)

list_searched_features = aiplatform.Feature.search()
Expand All @@ -450,7 +461,8 @@ def test_batch_serve_to_df(self, shared_state, caplog):
]

aiplatform.init(
project=e2e_base._PROJECT, location=e2e_base._LOCATION,
project=e2e_base._PROJECT,
location=e2e_base._LOCATION,
)

caplog.set_level(logging.INFO)
Expand Down Expand Up @@ -527,7 +539,8 @@ def test_batch_serve_to_gcs(self, shared_state, caplog):
]

aiplatform.init(
project=e2e_base._PROJECT, location=e2e_base._LOCATION,
project=e2e_base._PROJECT,
location=e2e_base._LOCATION,
)

caplog.set_level(logging.INFO)
Expand Down Expand Up @@ -577,7 +590,8 @@ def test_batch_serve_to_bq(self, shared_state, caplog):
]

aiplatform.init(
project=e2e_base._PROJECT, location=e2e_base._LOCATION,
project=e2e_base._PROJECT,
location=e2e_base._LOCATION,
)

caplog.set_level(logging.INFO)
Expand Down
3 changes: 1 addition & 2 deletions tests/system/aiplatform/test_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,13 @@

from google.cloud import aiplatform
from tests.system.aiplatform import e2e_base
import pytest


PARAMS = {"sdk-param-test-1": 0.1, "sdk-param-test-2": 0.2}

METRICS = {"sdk-metric-test-1": 0.8, "sdk-metric-test-2": 100}


@pytest.mark.skip(reason="Debug")
class TestMetadata(e2e_base.TestEndToEnd):

_temp_prefix = "temp-vertex-sdk-e2e-test"
Expand Down
8 changes: 5 additions & 3 deletions tests/system/aiplatform/test_model_upload.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
_XGBOOST_MODEL_URI = "gs://cloud-samples-data-us-central1/vertex-ai/google-cloud-aiplatform-ci-artifacts/models/iris_xgboost/model.bst"


@pytest.mark.skip(reason="Debug")
@pytest.mark.usefixtures("delete_staging_bucket")
class TestModel(e2e_base.TestEndToEnd):

Expand All @@ -38,7 +37,8 @@ def test_upload_and_deploy_xgboost_model(self, shared_state):
"""Upload XGBoost model from local file and deploy it for prediction. Additionally, update model name, description and labels"""

aiplatform.init(
project=e2e_base._PROJECT, location=e2e_base._LOCATION,
project=e2e_base._PROJECT,
location=e2e_base._LOCATION,
)

storage_client = storage.Client(project=e2e_base._PROJECT)
Expand All @@ -48,7 +48,9 @@ def test_upload_and_deploy_xgboost_model(self, shared_state):
model_path = tempfile.mktemp() + ".my_model.xgb"
model_blob.download_to_filename(filename=model_path)

model = aiplatform.Model.upload_xgboost_model_file(model_file_path=model_path,)
model = aiplatform.Model.upload_xgboost_model_file(
model_file_path=model_path,
)
shared_state["resources"] = [model]

staging_bucket = storage.Blob.from_string(
Expand Down
1 change: 0 additions & 1 deletion tests/system/aiplatform/test_project_id_inference.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
"""


@pytest.mark.skip(reason="Debug")
@pytest.mark.usefixtures("prepare_staging_bucket", "delete_staging_bucket")
class TestProjectIDInference(e2e_base.TestEndToEnd):

Expand Down
8 changes: 4 additions & 4 deletions tests/system/aiplatform/test_tensorboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,24 +17,24 @@

from google.cloud import aiplatform
from tests.system.aiplatform import e2e_base
import pytest


@pytest.mark.skip(reason="Debug")
class TestTensorboard(e2e_base.TestEndToEnd):

_temp_prefix = "temp-vertex-sdk-e2e-test"

def test_create_and_get_tensorboard(self, shared_state):

aiplatform.init(
project=e2e_base._PROJECT, location=e2e_base._LOCATION,
project=e2e_base._PROJECT,
location=e2e_base._LOCATION,
)

display_name = self._make_display_name("tensorboard")

tb = aiplatform.Tensorboard.create(
display_name=display_name, create_request_timeout=None,
display_name=display_name,
create_request_timeout=None,
)

shared_state["resources"] = [tb]
Expand Down

0 comments on commit 528a915

Please sign in to comment.