Skip to content

Commit 296c223

Browse files
Anton RepushkoH. Furkan Bozkurt
Anton Repushko
authored and
H. Furkan Bozkurt
committed
Improvements of the integration tests
1 parent 32f62fd commit 296c223

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

tests/integ/auto_ml_v2_utils.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@
6969
item_identifier_attribute_name="item_id",
7070
target_attribute_name="target",
7171
timestamp_attribute_name="timestamp",
72+
forecast_quantiles=["p10", "p50", "p90"],
7273
),
7374
}
7475

tests/integ/test_auto_ml_v2.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,9 @@ def test_auto_ml_v2_attach(problem_type, job_name_fixture_key, sagemaker_session
174174
assert desc["AutoMLJobName"] == job_name
175175
assert desc["AutoMLJobStatus"] in ["InProgress", "Completed"]
176176
assert desc["AutoMLJobSecondaryStatus"] != "Failed"
177-
assert desc["ProblemConfig"] == auto_ml_v2_utils.PROBLEM_CONFIGS[problem_type]
177+
assert sorted(desc["AutoMLProblemTypeConfig"]) == sorted(
178+
auto_ml_v2_utils.PROBLEM_CONFIGS[problem_type]
179+
)
178180
assert desc["OutputDataConfig"] == expected_default_output_config
179181

180182

@@ -251,6 +253,8 @@ def test_list_candidates(
251253

252254
candidates = auto_ml.list_candidates(job_name=job_name)
253255
assert len(candidates) == num_candidates
256+
else:
257+
pytest.skip("The job hasn't finished yet")
254258

255259

256260
@pytest.mark.skipif(
@@ -320,6 +324,8 @@ def test_best_candidate(
320324
best_candidate = auto_ml.best_candidate(job_name=job_name)
321325
assert len(best_candidate["InferenceContainers"]) == num_containers
322326
assert best_candidate["CandidateStatus"] == "Completed"
327+
else:
328+
pytest.skip("The job hasn't finished yet")
323329

324330

325331
@pytest.mark.skipif(
@@ -411,6 +417,8 @@ def test_deploy_best_candidate(
411417
)["EndpointStatus"]
412418
assert endpoint_status == "InService"
413419
sagemaker_session.sagemaker_client.delete_endpoint(EndpointName=endpoint_name)
420+
else:
421+
pytest.skip("The job hasn't finished yet")
414422

415423

416424
@pytest.mark.skipif(
@@ -482,3 +490,5 @@ def test_candidate_estimator_get_steps(
482490
candidate_estimator = CandidateEstimator(candidate, sagemaker_session)
483491
steps = candidate_estimator.get_steps()
484492
assert len(steps) == num_steps
493+
else:
494+
pytest.skip("The job hasn't finished yet")

0 commit comments

Comments
 (0)