Skip to content

fix(mlops): support StepCollection in the pipeline steps compiler - #6441

Open
AkshayShah03 wants to merge 1 commit into
aws:masterfrom
AkshayShah03:fix/steps-compiler-step-collection
Open

AkshayShah03 wants to merge 1 commit into
aws:masterfrom
AkshayShah03:fix/steps-compiler-step-collection

Conversation

@AkshayShah03

Copy link
Copy Markdown

Issue #, if available: N/A

Description of changes:

The v3 StepsCompiler dropped the StepCollection handling the v2 compiler had:

  • _simplify_step_list raises ValueError: Invalid input step type: <class '...StepCollection'> for a StepCollection;
  • _generate_step_map doesn't register its sub-steps.

As a result these all fail to build, even though Step.depends_on still documents StepCollection:

  • Pipeline(steps=[MonitorBatchTransformStep(...)]) (MonitorBatchTransformStep is still a StepCollection);
  • depends_on=[collection];
  • depends_on=["collection name"].

This change restores the v2 behaviour: a StepCollection is flattened into its sub-steps, and they're registered in the step map. step_collections only imports steps, so the new import doesn't introduce a cycle.

Testing:

  • New TestStepCollectionSupport: a collection in steps, and depends_on a collection by object and by name. All 3 fail before this change.
  • sagemaker-mlops/tests/unit: 835 passed (832 on master). The 28 feature_processor collection 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.

The v3 StepsCompiler dropped the StepCollection handling the v2 compiler
had: _simplify_step_list raised ValueError('Invalid input step type') for a
StepCollection, and _generate_step_map did not register its sub-steps. As
a result Pipeline(steps=[MonitorBatchTransformStep(...)]) (still a
StepCollection), depends_on=[collection] and depends_on=['collection name']
all failed to build, although Step.depends_on still documents
StepCollection.

Restore the v2 behaviour: flatten a StepCollection into its sub-steps and
register them in the step map.

This branch is waiting to be deployed

1 waiting deployment
manual-approval — 09f71468 Waiting Oct 16, 2026 by AkshayShah03 via wait-for-approval #2051
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant