32
32
from sagemaker .experiments .trial_component import _TrialComponent
33
33
from sagemaker .sklearn import SKLearn
34
34
from sagemaker .utils import retry_with_backoff , unique_name_from_base
35
- from tests .integ .sagemaker .experiments .helpers import name , cleanup_exp_resources , clear_run_context
35
+ from tests .integ .sagemaker .experiments .helpers import name , cleanup_exp_resources
36
36
from sagemaker .experiments .run import (
37
37
RUN_NAME_BASE ,
38
38
DELIMITER ,
@@ -55,7 +55,7 @@ def artifact_file_path(tempdir):
55
55
metric_name = "Test-Local-Init-Log-Metric"
56
56
57
57
58
- def test_local_run_with_load (sagemaker_session , artifact_file_path , clear_run_context ):
58
+ def test_local_run_with_load (sagemaker_session , artifact_file_path ):
59
59
exp_name = f"My-Local-Exp-{ name ()} "
60
60
with cleanup_exp_resources (exp_names = [exp_name ], sagemaker_session = sagemaker_session ):
61
61
# Run name is not provided, will create a new TC
@@ -86,9 +86,7 @@ def verify_load_run():
86
86
retry_with_backoff (verify_load_run , 4 )
87
87
88
88
89
- def test_two_local_run_init_with_same_run_name_and_different_exp_names (
90
- sagemaker_session , clear_run_context
91
- ):
89
+ def test_two_local_run_init_with_same_run_name_and_different_exp_names (sagemaker_session ):
92
90
exp_name1 = f"my-two-local-exp1-{ name ()} "
93
91
exp_name2 = f"my-two-local-exp2-{ name ()} "
94
92
run_name = "test-run"
@@ -126,9 +124,7 @@ def test_two_local_run_init_with_same_run_name_and_different_exp_names(
126
124
("my-test4" , "test-run" , "run-display-name-test" ), # with supplied display name
127
125
],
128
126
)
129
- def test_run_name_vs_trial_component_name_edge_cases (
130
- sagemaker_session , input_names , clear_run_context
131
- ):
127
+ def test_run_name_vs_trial_component_name_edge_cases (sagemaker_session , input_names ):
132
128
exp_name , run_name , run_display_name = input_names
133
129
with cleanup_exp_resources (exp_names = [exp_name ], sagemaker_session = sagemaker_session ):
134
130
with Run (
@@ -181,7 +177,6 @@ def test_run_from_local_and_train_job_and_all_exp_cfg_match(
181
177
execution_role ,
182
178
sagemaker_client_config ,
183
179
sagemaker_metrics_config ,
184
- clear_run_context ,
185
180
):
186
181
# Notes:
187
182
# 1. The 1st Run created locally and its exp config was auto passed to the job
@@ -282,7 +277,6 @@ def test_run_from_local_and_train_job_and_exp_cfg_not_match(
282
277
execution_role ,
283
278
sagemaker_client_config ,
284
279
sagemaker_metrics_config ,
285
- clear_run_context ,
286
280
):
287
281
# Notes:
288
282
# 1. The 1st Run created locally and its exp config was auto passed to the job
@@ -369,7 +363,6 @@ def test_run_from_train_job_only(
369
363
execution_role ,
370
364
sagemaker_client_config ,
371
365
sagemaker_metrics_config ,
372
- clear_run_context ,
373
366
):
374
367
# Notes:
375
368
# 1. No Run created locally or specified in experiment config
@@ -420,7 +413,6 @@ def test_run_from_processing_job_and_override_default_exp_config(
420
413
execution_role ,
421
414
sagemaker_client_config ,
422
415
sagemaker_metrics_config ,
423
- clear_run_context ,
424
416
):
425
417
# Notes:
426
418
# 1. The 1st Run (run) created locally
@@ -500,7 +492,6 @@ def test_run_from_transform_job(
500
492
execution_role ,
501
493
sagemaker_client_config ,
502
494
sagemaker_metrics_config ,
503
- clear_run_context ,
504
495
):
505
496
# Notes:
506
497
# 1. The 1st Run (run) created locally
@@ -582,7 +573,6 @@ def test_load_run_auto_pass_in_exp_config_to_job(
582
573
execution_role ,
583
574
sagemaker_client_config ,
584
575
sagemaker_metrics_config ,
585
- clear_run_context ,
586
576
):
587
577
# Notes:
588
578
# 1. In local side, load the Run created previously and invoke a job under the load context
@@ -631,7 +621,7 @@ def test_load_run_auto_pass_in_exp_config_to_job(
631
621
)
632
622
633
623
634
- def test_list (run_obj , sagemaker_session , clear_run_context ):
624
+ def test_list (run_obj , sagemaker_session ):
635
625
tc1 = _TrialComponent .create (
636
626
trial_component_name = f"non-run-tc1-{ name ()} " ,
637
627
sagemaker_session = sagemaker_session ,
@@ -653,7 +643,7 @@ def test_list(run_obj, sagemaker_session, clear_run_context):
653
643
assert run_tcs [0 ].experiment_config == run_obj .experiment_config
654
644
655
645
656
- def test_list_twice (run_obj , sagemaker_session , clear_run_context ):
646
+ def test_list_twice (run_obj , sagemaker_session ):
657
647
tc1 = _TrialComponent .create (
658
648
trial_component_name = f"non-run-tc1-{ name ()} " ,
659
649
sagemaker_session = sagemaker_session ,
0 commit comments