@@ -175,7 +175,7 @@ def test_pipeline_get_latest_execution_arn_none(mock_session, mock_step):
175175
176176
177177def test_pipeline_build_parameters_from_execution (mock_session , mock_step ):
178- from sagemaker .mlops .workflow .pipeline import _PipelineExecution
178+ from sagemaker .mlops .workflow .pipeline import PipelineExecution
179179 pipeline = Pipeline (name = "test-pipeline" , steps = [mock_step ], sagemaker_session = mock_session )
180180
181181 mock_session .sagemaker_client .list_pipeline_parameters_for_execution .return_value = {
@@ -268,43 +268,43 @@ def test_pipeline_delete_triggers_not_found(mock_session, mock_step):
268268
269269
270270def test_pipeline_execution_stop (mock_session ):
271- from sagemaker .mlops .workflow .pipeline import _PipelineExecution
271+ from sagemaker .mlops .workflow .pipeline import PipelineExecution
272272
273- execution = _PipelineExecution (arn = "arn" , sagemaker_session = mock_session )
273+ execution = PipelineExecution (arn = "arn" , sagemaker_session = mock_session )
274274 execution .stop ()
275275 mock_session .sagemaker_client .stop_pipeline_execution .assert_called_once ()
276276
277277
278278def test_pipeline_execution_describe (mock_session ):
279- from sagemaker .mlops .workflow .pipeline import _PipelineExecution
279+ from sagemaker .mlops .workflow .pipeline import PipelineExecution
280280
281- execution = _PipelineExecution (arn = "arn" , sagemaker_session = mock_session )
281+ execution = PipelineExecution (arn = "arn" , sagemaker_session = mock_session )
282282 execution .describe ()
283283 mock_session .sagemaker_client .describe_pipeline_execution .assert_called_once ()
284284
285285
286286def test_pipeline_execution_list_steps (mock_session ):
287- from sagemaker .mlops .workflow .pipeline import _PipelineExecution
287+ from sagemaker .mlops .workflow .pipeline import PipelineExecution
288288
289289 mock_session .sagemaker_client .list_pipeline_execution_steps .return_value = {"PipelineExecutionSteps" : []}
290- execution = _PipelineExecution (arn = "arn" , sagemaker_session = mock_session )
290+ execution = PipelineExecution (arn = "arn" , sagemaker_session = mock_session )
291291 result = execution .list_steps ()
292292 assert result == []
293293
294294
295295def test_pipeline_execution_list_parameters (mock_session ):
296- from sagemaker .mlops .workflow .pipeline import _PipelineExecution
296+ from sagemaker .mlops .workflow .pipeline import PipelineExecution
297297
298- execution = _PipelineExecution (arn = "arn" , sagemaker_session = mock_session )
298+ execution = PipelineExecution (arn = "arn" , sagemaker_session = mock_session )
299299 execution .list_parameters (max_results = 10 , next_token = "token" )
300300 mock_session .sagemaker_client .list_pipeline_parameters_for_execution .assert_called_once ()
301301
302302
303303def test_pipeline_execution_wait (mock_session ):
304- from sagemaker .mlops .workflow .pipeline import _PipelineExecution
304+ from sagemaker .mlops .workflow .pipeline import PipelineExecution
305305 import botocore .waiter
306306
307- execution = _PipelineExecution (arn = "arn" , sagemaker_session = mock_session )
307+ execution = PipelineExecution (arn = "arn" , sagemaker_session = mock_session )
308308 with patch ("botocore.waiter.create_waiter_with_client" ) as mock_waiter :
309309 mock_waiter .return_value .wait = Mock ()
310310 execution .wait (delay = 10 , max_attempts = 5 )
@@ -476,22 +476,22 @@ def test_pipeline_list_versions(mock_session, mock_step):
476476
477477
478478def test_pipeline_execution_result_waiter_error (mock_session ):
479- from sagemaker .mlops .workflow .pipeline import _PipelineExecution
479+ from sagemaker .mlops .workflow .pipeline import PipelineExecution
480480 from botocore .exceptions import WaiterError
481481
482- execution = _PipelineExecution (arn = "arn:aws:sagemaker:us-west-2:123456789012:pipeline/test/execution/exec-id" , sagemaker_session = mock_session )
482+ execution = PipelineExecution (arn = "arn:aws:sagemaker:us-west-2:123456789012:pipeline/test/execution/exec-id" , sagemaker_session = mock_session )
483483
484484 with patch .object (execution , "wait" , side_effect = WaiterError ("name" , "reason" , {})):
485485 with pytest .raises (WaiterError ):
486486 execution .result ("step1" )
487487
488488
489489def test_pipeline_execution_result_terminal_failure (mock_session ):
490- from sagemaker .mlops .workflow .pipeline import _PipelineExecution
490+ from sagemaker .mlops .workflow .pipeline import PipelineExecution
491491 from botocore .exceptions import WaiterError
492492 from sagemaker .core .remote_function .job import JOBS_CONTAINER_ENTRYPOINT
493493
494- execution = _PipelineExecution (arn = "arn:aws:sagemaker:us-west-2:123456789012:pipeline/test/execution/exec-id" , sagemaker_session = mock_session )
494+ execution = PipelineExecution (arn = "arn:aws:sagemaker:us-west-2:123456789012:pipeline/test/execution/exec-id" , sagemaker_session = mock_session )
495495 mock_session .sagemaker_client .list_pipeline_execution_steps .return_value = {
496496 "PipelineExecutionSteps" : [{"StepName" : "step1" , "Metadata" : {"TrainingJob" : {"Arn" : "arn:aws:sagemaker:us-west-2:123456789012:training-job/job" }}}]
497497 }
0 commit comments