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
@@ -87,7 +87,7 @@ def verify_load_run():
87
87
88
88
89
89
def test_two_local_run_init_with_same_run_name_and_different_exp_names (
90
- sagemaker_session , clear_run_context
90
+ sagemaker_session
91
91
):
92
92
exp_name1 = f"my-two-local-exp1-{ name ()} "
93
93
exp_name2 = f"my-two-local-exp2-{ name ()} "
@@ -127,7 +127,7 @@ def test_two_local_run_init_with_same_run_name_and_different_exp_names(
127
127
],
128
128
)
129
129
def test_run_name_vs_trial_component_name_edge_cases (
130
- sagemaker_session , input_names , clear_run_context
130
+ sagemaker_session , input_names
131
131
):
132
132
exp_name , run_name , run_display_name = input_names
133
133
with cleanup_exp_resources (exp_names = [exp_name ], sagemaker_session = sagemaker_session ):
@@ -181,7 +181,6 @@ def test_run_from_local_and_train_job_and_all_exp_cfg_match(
181
181
execution_role ,
182
182
sagemaker_client_config ,
183
183
sagemaker_metrics_config ,
184
- clear_run_context ,
185
184
):
186
185
# Notes:
187
186
# 1. The 1st Run created locally and its exp config was auto passed to the job
@@ -282,7 +281,6 @@ def test_run_from_local_and_train_job_and_exp_cfg_not_match(
282
281
execution_role ,
283
282
sagemaker_client_config ,
284
283
sagemaker_metrics_config ,
285
- clear_run_context ,
286
284
):
287
285
# Notes:
288
286
# 1. The 1st Run created locally and its exp config was auto passed to the job
@@ -369,7 +367,6 @@ def test_run_from_train_job_only(
369
367
execution_role ,
370
368
sagemaker_client_config ,
371
369
sagemaker_metrics_config ,
372
- clear_run_context ,
373
370
):
374
371
# Notes:
375
372
# 1. No Run created locally or specified in experiment config
@@ -420,7 +417,6 @@ def test_run_from_processing_job_and_override_default_exp_config(
420
417
execution_role ,
421
418
sagemaker_client_config ,
422
419
sagemaker_metrics_config ,
423
- clear_run_context ,
424
420
):
425
421
# Notes:
426
422
# 1. The 1st Run (run) created locally
@@ -500,7 +496,6 @@ def test_run_from_transform_job(
500
496
execution_role ,
501
497
sagemaker_client_config ,
502
498
sagemaker_metrics_config ,
503
- clear_run_context ,
504
499
):
505
500
# Notes:
506
501
# 1. The 1st Run (run) created locally
@@ -582,7 +577,6 @@ def test_load_run_auto_pass_in_exp_config_to_job(
582
577
execution_role ,
583
578
sagemaker_client_config ,
584
579
sagemaker_metrics_config ,
585
- clear_run_context ,
586
580
):
587
581
# Notes:
588
582
# 1. In local side, load the Run created previously and invoke a job under the load context
@@ -631,7 +625,7 @@ def test_load_run_auto_pass_in_exp_config_to_job(
631
625
)
632
626
633
627
634
- def test_list (run_obj , sagemaker_session , clear_run_context ):
628
+ def test_list (run_obj , sagemaker_session ):
635
629
tc1 = _TrialComponent .create (
636
630
trial_component_name = f"non-run-tc1-{ name ()} " ,
637
631
sagemaker_session = sagemaker_session ,
@@ -653,7 +647,7 @@ def test_list(run_obj, sagemaker_session, clear_run_context):
653
647
assert run_tcs [0 ].experiment_config == run_obj .experiment_config
654
648
655
649
656
- def test_list_twice (run_obj , sagemaker_session , clear_run_context ):
650
+ def test_list_twice (run_obj , sagemaker_session ):
657
651
tc1 = _TrialComponent .create (
658
652
trial_component_name = f"non-run-tc1-{ name ()} " ,
659
653
sagemaker_session = sagemaker_session ,
0 commit comments