Repository navigation
fix(mlops): call LocalPipelineSession's pipeline methods in local mode - #6444
Open
AkshayShah03 wants to merge 1 commit into
Open
AkshayShah03 wants to merge 1 commit into
AkshayShah03 wants to merge 1 commit into
Conversation
In v3 the local pipeline methods (create_pipeline, update_pipeline, describe_pipeline, delete_pipeline, start_pipeline_execution) moved from LocalSagemakerClient to sagemaker.mlops.local.LocalPipelineSession, but Pipeline's local-mode branches still called them on sagemaker_session.sagemaker_client. Pipeline.create(), upsert(), update() and start() with a LocalPipelineSession therefore always failed with AttributeError: 'LocalSagemakerClient' object has no attribute 'create_pipeline' (describe() and delete() hit the real client). Call the session's methods in local mode. The new test runs the Pipeline API against a real LocalPipelineSession; the existing local-mode unit tests asserted the client calls and now assert the session calls.
AkshayShah03
requested a deployment
to
manual-approval
October 12, 2026 17:59 — with
GitHub Actions
Waiting
AkshayShah03
requested a deployment
to
manual-approval
October 12, 2026 17:59 — with
GitHub Actions
Waiting
AkshayShah03
requested a deployment
to
manual-approval
October 12, 2026 17:59 — with
GitHub Actions
Waiting
This branch is waiting to be deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue #, if available: N/A
Description of changes:
In v3 the local pipeline methods (
create_pipeline,update_pipeline,describe_pipeline,delete_pipeline,start_pipeline_execution) moved fromLocalSagemakerClienttosagemaker.mlops.local.LocalPipelineSessionitself.local_session.pynotes: "Pipeline methods have been moved to sagemaker.mlops.local.LocalPipelineSession".Pipeline's local-mode branches still call them onsagemaker_session.sagemaker_client. So with aLocalPipelineSession:create(),upsert(),update()andstart()always fail withAttributeError: 'LocalSagemakerClient' object has no attribute 'create_pipeline';describe()anddelete()go to the real client.This change calls the session's own methods in local mode.
One related issue isn't addressed here: the mlops
LocalPipelineSessionsubclassesLocalSessionbut notPipelineSession, so step arguments aren't captured under it the way they are under the coreLocalPipelineSession. That's a larger change.Testing:
test_pipeline_api_in_local_moderunscreate,upsert,update,describe,startanddeleteagainst a realLocalPipelineSessionwith aFailSteppipeline; the execution endsFailedas designed. It fails before this change.test_pipeline.pyandtest_pipeline_class.pyasserted the client calls. They now assert the session calls.sagemaker-mlops/tests/unit: 833 passed. The 28feature_processorcollection errors also happen on master.By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.