Skip to content

Commit b0f2b4a

Browse files
authored
fix: temporarily skip tests impacted by data inconsistency (#3020)
1 parent 850972c commit b0f2b4a

10 files changed

+40
-4
lines changed

setup.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
import os
1717
from glob import glob
1818

19-
from setuptools import setup, find_packages
19+
from setuptools import find_packages, setup
2020

2121

2222
def read(fname):
@@ -81,6 +81,7 @@ def read_version():
8181
"fabric==2.6.0",
8282
"requests==2.27.1",
8383
"sagemaker-experiments==0.1.35",
84+
"Jinja2==3.0.3",
8485
],
8586
)
8687

tests/integ/sagemaker/lineage/conftest.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -709,9 +709,10 @@ def static_model_artifact(sagemaker_session, static_pipeline_execution_arn):
709709
)
710710
)
711711

712-
yield artifact.ModelArtifact.load(
713-
artifacts[0]["ArtifactArn"], sagemaker_session=sagemaker_session
714-
)
712+
artifact_arn = artifacts[0]["ArtifactArn"]
713+
logging.info(f"Using static model artifact {artifact_arn}")
714+
715+
yield artifact.ModelArtifact.load(artifact_arn, sagemaker_session=sagemaker_session)
715716

716717

717718
@pytest.fixture

tests/integ/sagemaker/lineage/test_action.py

+4
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ def test_tags(action_obj, sagemaker_session):
120120
assert [actual_tags[-1]] == tags
121121

122122

123+
@pytest.mark.skip("data inconsistency P61661075")
123124
def test_upstream_artifacts(static_model_deployment_action):
124125
artifacts_from_query = static_model_deployment_action.artifacts(
125126
direction=LineageQueryDirectionEnum.ASCENDANTS
@@ -129,6 +130,7 @@ def test_upstream_artifacts(static_model_deployment_action):
129130
assert "artifact" in artifact.artifact_arn
130131

131132

133+
@pytest.mark.skip("data inconsistency P61661075")
132134
def test_downstream_artifacts(static_approval_action):
133135
artifacts_from_query = static_approval_action.artifacts(
134136
direction=LineageQueryDirectionEnum.DESCENDANTS
@@ -138,6 +140,7 @@ def test_downstream_artifacts(static_approval_action):
138140
assert "artifact" in artifact.artifact_arn
139141

140142

143+
@pytest.mark.skip("data inconsistency P61661075")
141144
def test_datasets(static_approval_action, static_dataset_artifact, sagemaker_session):
142145
try:
143146
sagemaker_session.sagemaker_client.add_association(
@@ -165,6 +168,7 @@ def test_datasets(static_approval_action, static_dataset_artifact, sagemaker_ses
165168
pass
166169

167170

171+
@pytest.mark.skip("data inconsistency P61661075")
168172
def test_endpoints(static_approval_action):
169173
endpoint_contexts_from_query = static_approval_action.endpoints()
170174
assert len(endpoint_contexts_from_query) > 0

tests/integ/sagemaker/lineage/test_artifact.py

+1
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ def test_list_by_type(artifact_objs, sagemaker_session):
102102
assert artifact_names_listed[0] == expected_name
103103

104104

105+
@pytest.mark.skip("data inconsistency P61661075")
105106
def test_get_artifact(static_dataset_artifact):
106107
s3_uri = static_dataset_artifact.source.source_uri
107108
expected_artifact = static_dataset_artifact.s3_uri_artifacts(s3_uri=s3_uri)

tests/integ/sagemaker/lineage/test_dataset_artifact.py

+5
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
"""This module contains code to test SageMaker ``DatasetArtifact``"""
1414
from __future__ import absolute_import
1515

16+
import pytest
17+
1618

1719
def test_trained_models(
1820
dataset_artifact_associated_models,
@@ -27,6 +29,7 @@ def test_trained_models(
2729
assert model.destination_type == "Context"
2830

2931

32+
@pytest.mark.skip("data inconsistency P61661075")
3033
def test_endpoint_contexts(
3134
static_dataset_artifact,
3235
):
@@ -37,6 +40,7 @@ def test_endpoint_contexts(
3740
assert context.context_type == "Endpoint"
3841

3942

43+
@pytest.mark.skip("data inconsistency P61661075")
4044
def test_get_upstream_datasets(static_dataset_artifact, sagemaker_session):
4145
artifacts_from_query = static_dataset_artifact.upstream_datasets()
4246
assert len(artifacts_from_query) > 0
@@ -45,6 +49,7 @@ def test_get_upstream_datasets(static_dataset_artifact, sagemaker_session):
4549
assert "artifact" in artifact.artifact_arn
4650

4751

52+
@pytest.mark.skip("data inconsistency P61661075")
4853
def test_get_down_datasets(static_dataset_artifact, sagemaker_session):
4954
artifacts_from_query = static_dataset_artifact.downstream_datasets()
5055
assert len(artifacts_from_query) > 0

tests/integ/sagemaker/lineage/test_endpoint_context.py

+8
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
from __future__ import absolute_import
1515
import time
1616

17+
import pytest
18+
1719
SLEEP_TIME_ONE_SECONDS = 1
1820
SLEEP_TIME_THREE_SECONDS = 3
1921

@@ -38,6 +40,7 @@ def test_model_v2(endpoint_context_associate_with_model, model_obj, sagemaker_se
3840
assert model.properties == model_obj.properties
3941

4042

43+
@pytest.mark.skip("data inconsistency P61661075")
4144
def test_dataset_artifacts(static_endpoint_context):
4245
artifacts_from_query = static_endpoint_context.dataset_artifacts()
4346

@@ -46,6 +49,7 @@ def test_dataset_artifacts(static_endpoint_context):
4649
assert artifact.artifact_type == "DataSet"
4750

4851

52+
@pytest.mark.skip("data inconsistency P61661075")
4953
def test_training_job_arns(
5054
static_endpoint_context,
5155
):
@@ -56,12 +60,14 @@ def test_training_job_arns(
5660
assert "training-job" in arn
5761

5862

63+
@pytest.mark.skip("data inconsistency P61661075")
5964
def test_pipeline_execution_arn(static_endpoint_context, static_pipeline_execution_arn):
6065
pipeline_execution_arn = static_endpoint_context.pipeline_execution_arn()
6166

6267
assert pipeline_execution_arn == static_pipeline_execution_arn
6368

6469

70+
@pytest.mark.skip("data inconsistency P61661075")
6571
def test_transform_jobs(
6672
sagemaker_session, static_transform_job_trial_component, static_endpoint_context
6773
):
@@ -84,6 +90,7 @@ def test_transform_jobs(
8490
)
8591

8692

93+
@pytest.mark.skip("data inconsistency P61661075")
8794
def test_processing_jobs(
8895
sagemaker_session, static_transform_job_trial_component, static_endpoint_context
8996
):
@@ -94,6 +101,7 @@ def test_processing_jobs(
94101
assert "ProcessingJob" in processing_job.source.get("SourceType")
95102

96103

104+
@pytest.mark.skip("data inconsistency P61661075")
97105
def test_trial_components(
98106
sagemaker_session, static_transform_job_trial_component, static_endpoint_context
99107
):

tests/integ/sagemaker/lineage/test_image_artifact.py

+3
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,12 @@
1313
"""This module contains code to test SageMaker ``ImageArtifact``"""
1414
from __future__ import absolute_import
1515

16+
import pytest
17+
1618
from sagemaker.lineage.query import LineageQueryDirectionEnum
1719

1820

21+
@pytest.mark.skip("data inconsistency P61661075")
1922
def test_dataset(static_image_artifact, sagemaker_session):
2023
artifacts_from_query = static_image_artifact.datasets(
2124
direction=LineageQueryDirectionEnum.DESCENDANTS

tests/integ/sagemaker/lineage/test_lineage_trial_component.py

+5
Original file line numberDiff line numberDiff line change
@@ -13,21 +13,26 @@
1313
"""This module contains code to test SageMaker ``Trial Component``"""
1414
from __future__ import absolute_import
1515

16+
import pytest
1617

18+
19+
@pytest.mark.skip("data inconsistency P61661075")
1720
def test_dataset_artifacts(static_training_job_trial_component):
1821
artifacts_from_query = static_training_job_trial_component.dataset_artifacts()
1922
assert len(artifacts_from_query) > 0
2023
for artifact in artifacts_from_query:
2124
assert artifact.artifact_type == "DataSet"
2225

2326

27+
@pytest.mark.skip("data inconsistency P61661075")
2428
def test_models(static_processing_job_trial_component):
2529
artifacts_from_query = static_processing_job_trial_component.models()
2630
assert len(artifacts_from_query) > 0
2731
for artifact in artifacts_from_query:
2832
assert artifact.artifact_type == "Model"
2933

3034

35+
@pytest.mark.skip("data inconsistency P61661075")
3136
def test_pipeline_execution_arn(static_training_job_trial_component, static_pipeline_execution_arn):
3237
pipeline_execution_arn = static_training_job_trial_component.pipeline_execution_arn()
3338
assert pipeline_execution_arn == static_pipeline_execution_arn

tests/integ/sagemaker/lineage/test_model_artifact.py

+5
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
"""This module contains code to test SageMaker ``DatasetArtifact``"""
1414
from __future__ import absolute_import
1515

16+
import pytest
17+
1618

1719
def test_endpoints(
1820
model_artifact_associated_endpoints,
@@ -38,6 +40,7 @@ def test_endpoint_contexts(
3840
assert context.context_type == "Endpoint"
3941

4042

43+
@pytest.mark.skip("data inconsistency P61661075")
4144
def test_dataset_artifacts(
4245
static_model_artifact,
4346
):
@@ -48,6 +51,7 @@ def test_dataset_artifacts(
4851
assert artifact.artifact_type == "DataSet"
4952

5053

54+
@pytest.mark.skip("data inconsistency P61661075")
5155
def test_training_job_arns(
5256
static_model_artifact,
5357
):
@@ -58,6 +62,7 @@ def test_training_job_arns(
5862
assert "training-job" in arn
5963

6064

65+
@pytest.mark.skip("data inconsistency P61661075")
6166
def test_pipeline_execution_arn(static_model_artifact, static_pipeline_execution_arn):
6267
pipeline_execution_arn = static_model_artifact.pipeline_execution_arn()
6368

tests/integ/sagemaker/lineage/test_model_package_group_context.py

+3
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,10 @@
1313
"""This module contains code to test SageMaker ``ModelPackageGroup``"""
1414
from __future__ import absolute_import
1515

16+
import pytest
1617

18+
19+
@pytest.mark.skip("data inconsistency P61661075")
1720
def test_pipeline_execution_arn(static_model_package_group_context, static_pipeline_execution_arn):
1821
pipeline_execution_arn = static_model_package_group_context.pipeline_execution_arn()
1922

0 commit comments

Comments
 (0)