Repository navigation
fix: preserve pipeline input dictionaries across runs and streams - #13619
Conversation
|
@remote-controlled-man is attempting to deploy a commit to the deepset Team on Vercel. A member of the Team first needs to authorize it. |
|
Hi @remote-controlled-man, thanks a lot for your contribution! 🙏 We noticed that the Contributor License Agreement (CLA) check ( To get your PR reviewed, please sign the CLA via the link in the |
|
Thanks for signing the CLA, @remote-controlled-man! 🎉 This PR is now ready for review again and the reviewer has been re-assigned. |
Coverage reportClick to see where and how coverage changed
This report was generated by python-coverage-comment-action |
||||||||||||||||||||||||||||||
|
|
||
|
|
||
| @pytest.mark.parametrize("use_async", [False, True], ids=["run", "run_async"]) | ||
| @pytest.mark.parametrize("flat_input", [False, True], ids=["nested", "flat"]) |
There was a problem hiding this comment.
Lets drop the flat_input parametrization. The flat path already builds a new dict, so those cases pass on main too.
| # deepcopying the inputs prevents the Pipeline run logic from being altered unexpectedly | ||
| # when the same input reference is passed to multiple components. |
There was a problem hiding this comment.
Could we extend this comment to say we build a new dict so the caller's data is left unmodified?
Related Issues
No existing issue found during targeted searches.
Proposed Changes
Build a new component-input mapping in the shared preparation used by
Pipeline.run(),Pipeline.run_async(), andPipeline.stream(), preserving the caller'sdatadictionary and the existing deep-copy behavior. Concurrent streams that reuse the same input dictionary keep their chunks isolated. Remove the stream-only outer copy.Describe these user-visible changes in the release note.
How did you test it?
The public-API regressions exercise
run()andrun_async()with component-qualified inputs and a component that mutates its own input. Both cases fail with the original mutating helper and pass with the shared fix. The original concurrent-stream regression still covers runs with and without a runtime callback.All four focused cases pass without model calls, mocks, or timing sleeps. On commit
7573220, using the project Hatch environments:hatch run test:unit test/core/pipeline: 455 passed, 155 integration tests deselected.hatch -e test run mypy --cache-dir=.mypy_cache/on the four relevant Python files: passed.hatch run fmt-checkon the four relevant Python files: passed.hatch run pre-commit run --fileson the five relevant files: passed, with inapplicable hooks skipped.Reno lint is validated by the
Check Release NotesCI workflow, which uses a full checkout. Local execution remains unavailable in this shallow checkout; release-note YAML and reStructuredText checks run through pre-commit.The full repository suite and external-service integration tests were not run locally.
Notes for the reviewer
This PR was fully generated with OpenAI Codex while investigating pipeline execution isolation. A separate agent reviewed the frozen changes and validation evidence.
Checklist