Skip to content

Commit b684cda

Browse files
authored
Merge branch 'master' into update-return-values
2 parents 93a7a0e + bd8f023 commit b684cda

File tree

5 files changed

+165
-14
lines changed

5 files changed

+165
-14
lines changed

CHANGELOG.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,35 @@
11
# Changelog
22

3+
## v2.25.0 (2021-02-19)
4+
5+
### Features
6+
7+
* Enable step caching
8+
* Add other Neo supported regions for Inferentia inference images
9+
10+
### Bug Fixes and Other Changes
11+
12+
* remove FailStep from pipelines
13+
* use sagemaker_session in workflow tests
14+
* use ECR public for multidatamodel tests
15+
* add the mapping from py3 to cuda11 images
16+
* Add 30s cap time for tag tests
17+
* add build spec for slow tests
18+
* mark top 10 slow tests
19+
* remove slow test_run_xxx_monitor_baseline tests
20+
* pin astroid to 2.4.2
21+
22+
### Testing and Release Infrastructure
23+
24+
* unmark more flaky integ tests
25+
* remove canary_quick pytest mark from flaky/unnecessary tests
26+
* remove python3.8 from buildspec
27+
* remove py38 tox env
28+
* fix release buildspec typo
29+
* unblock regional release builds
30+
* lower test TPS for experiment analytics
31+
* move package preparation and publishing to the deploy step
32+
333
## v2.24.5 (2021-02-12)
434

535
### Bug Fixes and Other Changes

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.24.6.dev0
1+
2.25.1.dev0

tests/integ/test_airflow_config.py

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@
6060
SINGLE_INSTANCE_COUNT = 1
6161

6262

63-
@pytest.mark.canary_quick
6463
def test_byo_airflow_config_uploads_data_source_to_s3_when_inputs_provided(
6564
sagemaker_session, cpu_instance_type
6665
):
@@ -92,7 +91,6 @@ def test_byo_airflow_config_uploads_data_source_to_s3_when_inputs_provided(
9291
)
9392

9493

95-
@pytest.mark.canary_quick
9694
def test_kmeans_airflow_config_uploads_data_source_to_s3(sagemaker_session, cpu_instance_type):
9795
with timeout(seconds=AIRFLOW_CONFIG_TIMEOUT_IN_SECONDS):
9896
kmeans = KMeans(
@@ -153,7 +151,6 @@ def test_fm_airflow_config_uploads_data_source_to_s3(sagemaker_session, cpu_inst
153151
)
154152

155153

156-
@pytest.mark.canary_quick
157154
def test_ipinsights_airflow_config_uploads_data_source_to_s3(sagemaker_session, cpu_instance_type):
158155
with timeout(seconds=AIRFLOW_CONFIG_TIMEOUT_IN_SECONDS):
159156
data_path = os.path.join(DATA_DIR, "ipinsights")
@@ -214,7 +211,6 @@ def test_knn_airflow_config_uploads_data_source_to_s3(sagemaker_session, cpu_ins
214211
tests.integ.test_region() in tests.integ.NO_LDA_REGIONS,
215212
reason="LDA image is not supported in certain regions",
216213
)
217-
@pytest.mark.canary_quick
218214
def test_lda_airflow_config_uploads_data_source_to_s3(sagemaker_session, cpu_instance_type):
219215
with timeout(seconds=AIRFLOW_CONFIG_TIMEOUT_IN_SECONDS):
220216
data_path = os.path.join(DATA_DIR, "lda")
@@ -247,7 +243,6 @@ def test_lda_airflow_config_uploads_data_source_to_s3(sagemaker_session, cpu_ins
247243
)
248244

249245

250-
@pytest.mark.canary_quick
251246
def test_linearlearner_airflow_config_uploads_data_source_to_s3(
252247
sagemaker_session, cpu_instance_type
253248
):
@@ -312,7 +307,6 @@ def test_linearlearner_airflow_config_uploads_data_source_to_s3(
312307
)
313308

314309

315-
@pytest.mark.canary_quick
316310
def test_ntm_airflow_config_uploads_data_source_to_s3(sagemaker_session, cpu_instance_type):
317311
with timeout(seconds=AIRFLOW_CONFIG_TIMEOUT_IN_SECONDS):
318312
data_path = os.path.join(DATA_DIR, "ntm")
@@ -346,7 +340,6 @@ def test_ntm_airflow_config_uploads_data_source_to_s3(sagemaker_session, cpu_ins
346340
)
347341

348342

349-
@pytest.mark.canary_quick
350343
def test_pca_airflow_config_uploads_data_source_to_s3(sagemaker_session, cpu_instance_type):
351344
with timeout(seconds=AIRFLOW_CONFIG_TIMEOUT_IN_SECONDS):
352345
pca = PCA(
@@ -373,7 +366,6 @@ def test_pca_airflow_config_uploads_data_source_to_s3(sagemaker_session, cpu_ins
373366
)
374367

375368

376-
@pytest.mark.canary_quick
377369
def test_rcf_airflow_config_uploads_data_source_to_s3(sagemaker_session, cpu_instance_type):
378370
with timeout(seconds=AIRFLOW_CONFIG_TIMEOUT_IN_SECONDS):
379371
# Generate a thousand 14-dimensional datapoints.
@@ -439,7 +431,6 @@ def test_chainer_airflow_config_uploads_data_source_to_s3(
439431
)
440432

441433

442-
@pytest.mark.canary_quick
443434
def test_mxnet_airflow_config_uploads_data_source_to_s3(
444435
sagemaker_session,
445436
cpu_instance_type,
@@ -514,7 +505,6 @@ def test_sklearn_airflow_config_uploads_data_source_to_s3(
514505
)
515506

516507

517-
@pytest.mark.canary_quick
518508
def test_tf_airflow_config_uploads_data_source_to_s3(
519509
sagemaker_session,
520510
cpu_instance_type,
@@ -548,7 +538,6 @@ def test_tf_airflow_config_uploads_data_source_to_s3(
548538
)
549539

550540

551-
@pytest.mark.canary_quick
552541
def test_xgboost_airflow_config_uploads_data_source_to_s3(
553542
sagemaker_session, cpu_instance_type, xgboost_latest_version
554543
):
@@ -574,7 +563,6 @@ def test_xgboost_airflow_config_uploads_data_source_to_s3(
574563
)
575564

576565

577-
@pytest.mark.canary_quick
578566
def test_pytorch_airflow_config_uploads_data_source_to_s3_when_inputs_not_provided(
579567
sagemaker_session,
580568
cpu_instance_type,

tests/integ/test_tuner_multi_algo.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,6 @@ def estimator_knn(sagemaker_session, cpu_instance_type):
9797
return estimator
9898

9999

100-
@pytest.mark.canary_quick
101100
def test_multi_estimator_tuning(
102101
sagemaker_session, estimator_fm, estimator_knn, data_set, cpu_instance_type
103102
):

tests/unit/sagemaker/lineage/test_visualizer.py

Lines changed: 134 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,3 +119,137 @@ def test_trial_component_name(sagemaker_session, vizualizer):
119119
)
120120

121121
pd.testing.assert_frame_equal(expected_dataframe, df)
122+
123+
124+
def test_model_package_arn(sagemaker_session, vizualizer):
125+
name = "model_package_arn"
126+
127+
sagemaker_session.sagemaker_client.list_artifacts.return_value = {
128+
"ArtifactSummaries": [{"ArtifactArn": "artifact-arn"}]
129+
}
130+
131+
sagemaker_session.sagemaker_client.list_associations.side_effect = [
132+
{
133+
"AssociationSummaries": [
134+
{
135+
"SourceArn": "a:b:c:d:e:artifact/src-arn-1",
136+
"SourceName": "source-name-1",
137+
"SourceType": "source-type-1",
138+
"DestinationArn": "a:b:c:d:e:artifact/dest-arn-1",
139+
"DestinationName": "dest-name-1",
140+
"DestinationType": "dest-type-1",
141+
"AssociationType": "type-1",
142+
}
143+
]
144+
},
145+
{
146+
"AssociationSummaries": [
147+
{
148+
"SourceArn": "a:b:c:d:e:artifact/src-arn-2",
149+
"SourceName": "source-name-2",
150+
"SourceType": "source-type-2",
151+
"DestinationArn": "a:b:c:d:e:artifact/dest-arn-2",
152+
"DestinationName": "dest-name-2",
153+
"DestinationType": "dest-type-2",
154+
"AssociationType": "type-2",
155+
}
156+
]
157+
},
158+
]
159+
160+
df = vizualizer.show(model_package_arn=name)
161+
162+
sagemaker_session.sagemaker_client.list_artifacts.assert_called_with(
163+
SourceUri=name,
164+
)
165+
166+
expected_calls = [
167+
unittest.mock.call(
168+
DestinationArn="artifact-arn",
169+
),
170+
unittest.mock.call(
171+
SourceArn="artifact-arn",
172+
),
173+
]
174+
assert expected_calls == sagemaker_session.sagemaker_client.list_associations.mock_calls
175+
176+
expected_dataframe = pd.DataFrame.from_dict(
177+
OrderedDict(
178+
[
179+
("Name/Source", ["source-name-1", "dest-name-2"]),
180+
("Direction", ["Input", "Output"]),
181+
("Type", ["source-type-1", "dest-type-2"]),
182+
("Association Type", ["type-1", "type-2"]),
183+
("Lineage Type", ["artifact", "artifact"]),
184+
]
185+
)
186+
)
187+
188+
pd.testing.assert_frame_equal(expected_dataframe, df)
189+
190+
191+
def test_endpoint_arn(sagemaker_session, vizualizer):
192+
name = "endpoint_arn"
193+
194+
sagemaker_session.sagemaker_client.list_contexts.return_value = {
195+
"ContextSummaries": [{"ContextArn": "context-arn"}]
196+
}
197+
198+
sagemaker_session.sagemaker_client.list_associations.side_effect = [
199+
{
200+
"AssociationSummaries": [
201+
{
202+
"SourceArn": "a:b:c:d:e:context/src-arn-1",
203+
"SourceName": "source-name-1",
204+
"SourceType": "source-type-1",
205+
"DestinationArn": "a:b:c:d:e:context/dest-arn-1",
206+
"DestinationName": "dest-name-1",
207+
"DestinationType": "dest-type-1",
208+
"AssociationType": "type-1",
209+
}
210+
]
211+
},
212+
{
213+
"AssociationSummaries": [
214+
{
215+
"SourceArn": "a:b:c:d:e:context/src-arn-2",
216+
"SourceName": "source-name-2",
217+
"SourceType": "source-type-2",
218+
"DestinationArn": "a:b:c:d:e:context/dest-arn-2",
219+
"DestinationName": "dest-name-2",
220+
"DestinationType": "dest-type-2",
221+
"AssociationType": "type-2",
222+
}
223+
]
224+
},
225+
]
226+
227+
df = vizualizer.show(endpoint_arn=name)
228+
229+
sagemaker_session.sagemaker_client.list_contexts.assert_called_with(
230+
SourceUri=name,
231+
)
232+
233+
expected_calls = [
234+
unittest.mock.call(
235+
DestinationArn="context-arn",
236+
),
237+
unittest.mock.call(
238+
SourceArn="context-arn",
239+
),
240+
]
241+
assert expected_calls == sagemaker_session.sagemaker_client.list_associations.mock_calls
242+
243+
expected_dataframe = pd.DataFrame.from_dict(
244+
OrderedDict(
245+
[
246+
("Name/Source", ["source-name-1", "dest-name-2"]),
247+
("Direction", ["Input", "Output"]),
248+
("Type", ["source-type-1", "dest-type-2"]),
249+
("Association Type", ["type-1", "type-2"]),
250+
("Lineage Type", ["context", "context"]),
251+
]
252+
)
253+
)
254+
255+
pd.testing.assert_frame_equal(expected_dataframe, df)

0 commit comments

Comments
 (0)