Skip to content

Commit

Permalink
chore: testing autologging system tests
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 509936731
  • Loading branch information
sararob authored and copybara-github committed Feb 15, 2023
1 parent 5fdb7fc commit f0c07e7
Show file tree
Hide file tree
Showing 22 changed files with 22 additions and 22 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
testing_extra_require = (
full_extra_require
+ profiler_extra_require
+ ["grpcio-testing", "pytest-asyncio", "pytest-xdist", "ipython", "kfp", "xgboost"]
+ ["grpcio-testing", "pytest-asyncio", "pytest-xdist", "ipython", "kfp", "xgboost", "sklearn"]
)


Expand Down
2 changes: 1 addition & 1 deletion tests/system/aiplatform/test_autologging.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ def test_autologging_with_autorun_creation(self, shared_state):
experiment_df_scikit = aiplatform.get_experiment_df()
assert experiment_df_scikit["run_name"][0].startswith("sklearn-")
assert experiment_df_scikit["param.fit_intercept"][0] == "True"
assert experiment_df_scikit["metric.training_mae"][0] > 0
assert experiment_df_scikit["metric.training_mean_absolute_error"][0] > 0

# Write post-training metrics to a scikit-learn model
assert "metric.LinearRegression_score_X" not in experiment_df_scikit.columns
Expand Down
2 changes: 1 addition & 1 deletion tests/system/aiplatform/test_batch_prediction.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
_TEST_MAX_REPLICA_COUNT = 12
_TEST_BATCH_SIZE = 16


@pytest.mark.skip()
class TestBatchPredictionJob(e2e_base.TestEndToEnd):
_temp_prefix = "temp_e2e_batch_prediction_test_"

Expand Down
2 changes: 1 addition & 1 deletion tests/system/aiplatform/test_custom_job.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
_DIR_NAME, "test_resources/custom_job_script.py"
)


@pytest.mark.skip()
@pytest.mark.usefixtures(
"prepare_staging_bucket", "delete_staging_bucket", "tear_down_resources"
)
Expand Down
2 changes: 1 addition & 1 deletion tests/system/aiplatform/test_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@
bigquery.SchemaField(name="datetime_col", field_type="DATETIME"),
]


@pytest.mark.skip()
class TestDataset(e2e_base.TestEndToEnd):

_temp_prefix = "temp-vertex-sdk-dataset-test"
Expand Down
2 changes: 1 addition & 1 deletion tests/system/aiplatform/test_e2e_forecasting.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"bq://ucaip-sample-tests:ucaip_test_us_central1.2021_sales_predict"
)


@pytest.mark.skip()
@pytest.mark.usefixtures("prepare_staging_bucket", "delete_staging_bucket")
class TestEndToEndForecasting(e2e_base.TestEndToEnd):
"""End to end system test of the Vertex SDK with forecasting data."""
Expand Down
2 changes: 1 addition & 1 deletion tests/system/aiplatform/test_e2e_metadata_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
)
from tests.system.aiplatform import e2e_base


@pytest.mark.skip()
@pytest.mark.usefixtures("tear_down_resources")
class TestMetadataSchema(e2e_base.TestEndToEnd):

Expand Down
2 changes: 1 addition & 1 deletion tests/system/aiplatform/test_e2e_tabular.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"median_income": 3.014700,
}


@pytest.mark.skip()
@pytest.mark.usefixtures(
"prepare_staging_bucket", "delete_staging_bucket", "tear_down_resources"
)
Expand Down
2 changes: 1 addition & 1 deletion tests/system/aiplatform/test_experiment_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
e2e_base._LOCATION.split("-", 1)[0]
]


@pytest.mark.skip()
@pytest.mark.usefixtures(
"prepare_staging_bucket", "delete_staging_bucket", "tear_down_resources"
)
Expand Down
2 changes: 1 addition & 1 deletion tests/system/aiplatform/test_experiments.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"threshold": [0.9, 0.5, 0.1],
}


@pytest.mark.skip()
@pytest.mark.usefixtures(
"prepare_staging_bucket", "delete_staging_bucket", "tear_down_resources"
)
Expand Down
2 changes: 1 addition & 1 deletion tests/system/aiplatform/test_featurestore.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
_TEST_MOVIE_GENRES_FEATURE_ID = "genres"
_TEST_MOVIE_AVERAGE_RATING_FEATURE_ID = "average_rating"


@pytest.mark.skip()
@pytest.mark.usefixtures(
"prepare_staging_bucket",
"delete_staging_bucket",
Expand Down
2 changes: 1 addition & 1 deletion tests/system/aiplatform/test_matching_engine_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@

_TEST_FILTER = [Namespace("name", ["allow_token"], ["deny_token"])]


@pytest.mark.skip()
class TestMatchingEngine(e2e_base.TestEndToEnd):

_temp_prefix = "temp_vertex_sdk_e2e_matching_engine_test"
Expand Down
2 changes: 1 addition & 1 deletion tests/system/aiplatform/test_model_interactions.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"sepal_width": "3.0",
}


@pytest.mark.skip()
class TestModelInteractions(e2e_base.TestEndToEnd):
_temp_prefix = ""
aiplatform.init(project=e2e_base._PROJECT, location=e2e_base._LOCATION)
Expand Down
2 changes: 1 addition & 1 deletion tests/system/aiplatform/test_model_monitoring.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@

objective_config2 = model_monitoring.ObjectiveConfig(skew_config, drift_config2)


@pytest.mark.skip()
@pytest.mark.usefixtures("tear_down_resources")
class TestModelDeploymentMonitoring(e2e_base.TestEndToEnd):
_temp_prefix = "temp_e2e_model_monitoring_test_"
Expand Down
2 changes: 1 addition & 1 deletion tests/system/aiplatform/test_model_upload.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

_XGBOOST_MODEL_URI = "gs://cloud-samples-data-us-central1/vertex-ai/google-cloud-aiplatform-ci-artifacts/models/iris_xgboost/model.bst"


@pytest.mark.skip()
@pytest.mark.usefixtures("delete_staging_bucket", "tear_down_resources")
class TestModelUploadAndUpdate(e2e_base.TestEndToEnd):

Expand Down
2 changes: 1 addition & 1 deletion tests/system/aiplatform/test_model_version_management.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
from tests.system.aiplatform import e2e_base
from tests.system.aiplatform import test_model_upload


@pytest.mark.skip()
@pytest.mark.usefixtures("delete_staging_bucket", "tear_down_resources")
class TestVersionManagement(e2e_base.TestEndToEnd):

Expand Down
2 changes: 1 addition & 1 deletion tests/system/aiplatform/test_pipeline_job.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

from google.protobuf.json_format import MessageToDict


@pytest.mark.skip()
@pytest.mark.usefixtures("tear_down_resources")
class TestPipelineJob(e2e_base.TestEndToEnd):

Expand Down
2 changes: 1 addition & 1 deletion tests/system/aiplatform/test_prediction_cpr.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
_ARTIFACT_URI = "gs://cloud-aiplatform-us-central1/vertex-ai/prediction-cpr/sklearn"
_PREDICTION_INPUT = [[4.6, 3.1, 1.5, 0.2]]


@pytest.mark.skip()
@pytest.mark.usefixtures("tear_down_resources")
class TestPredictionCpr(e2e_base.TestEndToEnd):
"""End to end system test of the Vertex SDK with Prediction custom prediction routines."""
Expand Down
2 changes: 1 addition & 1 deletion tests/system/aiplatform/test_private_endpoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
_MODEL_ID = "6430031960164270080"
_PRIVATE_ENDPOINT_NETWORK = "projects/580378083368/global/networks/private-endpoint-vpc"


@pytest.mark.skip()
@pytest.mark.usefixtures("tear_down_resources")
class TestPrivateEndpoint(e2e_base.TestEndToEnd):

Expand Down
2 changes: 1 addition & 1 deletion tests/system/aiplatform/test_project_id_inference.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
assert not aiplatform.initializer.global_config.project.endswith("-tp")
"""


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

Expand Down
2 changes: 1 addition & 1 deletion tests/system/aiplatform/test_tensorboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
from google.cloud import aiplatform
from tests.system.aiplatform import e2e_base


@pytest.mark.skip()
@pytest.mark.usefixtures("tear_down_resources")
class TestTensorboard(e2e_base.TestEndToEnd):

Expand Down
2 changes: 1 addition & 1 deletion tests/system/aiplatform/test_vizier.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

_TEST_STUDY_ID = 123


@pytest.mark.skip()
@pytest.mark.usefixtures("tear_down_resources")
class TestVizier(e2e_base.TestEndToEnd):
_temp_prefix = "temp_vertex_sdk_e2e_vizier_test"
Expand Down

0 comments on commit f0c07e7

Please sign in to comment.