Skip to content

Conversation

@schustmi
Copy link
Contributor

@schustmi schustmi commented Dec 5, 2025

Describe changes

This PR adds two more items that a step.map(...) call works for:

  • A list of output artifacts
  • The output of a .map(...) or .product(...) call if the step only returns a single output artifact

Example:

from zenml import pipeline, step

@step
def producer() -> int:
  return 1

@step
def worker(a: int) -> int:
  return a * 2

@pipeline(dynamic=True)
def map_example():
  artifact_list = [producer() for _ in range(3)]
  result = worker.map(artifact_list)  # map over list of outputs
  worker.map(result)  # map over output of previous `map(...)` call

Pre-requisites

Please ensure you have done the following:

  • I have read the CONTRIBUTING.md document.
  • I have added tests to cover my changes.
  • I have based my new branch on develop and the open PR is targeting develop. If your branch wasn't based on develop read Contribution guide on rebasing branch to develop.
  • IMPORTANT: I made sure that my changes are reflected properly in the following resources:
    • ZenML Docs
    • Dashboard: Needs to be communicated to the frontend team.
    • Templates: Might need adjustments (that are not reflected in the template tests) in case of non-breaking changes and deprecations.
    • Projects: Depending on the version dependencies, different projects might get affected.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Other (add details above)

@schustmi schustmi added the no-release-notes Release notes will NOT be attached and used publicly for this PR. label Dec 5, 2025
@schustmi schustmi requested a review from AlexejPenner December 5, 2025 08:36
@github-actions github-actions bot added internal To filter out internal PRs and issues enhancement New feature or request labels Dec 5, 2025
@schustmi schustmi changed the title Allow mapping over map results Allow mapping over artifact lists Dec 5, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Dec 5, 2025

Documentation Link Check Results

Absolute links check failed
There are broken absolute links in the documentation. See workflow logs for details
Relative links check passed
Last checked: 2025-12-05 09:27:25 UTC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request internal To filter out internal PRs and issues no-release-notes Release notes will NOT be attached and used publicly for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants