mirror of
https://github.com/deepset-ai/haystack.git
synced 2025-06-26 22:00:13 +00:00
fix: Remove old reno and update reno (#9357)
* Remove old reno and update reno * Update releasenotes/notes/dont-deepcopy-components-tools-b1be7ef7b4365116.yaml Co-authored-by: Stefano Fiorucci <stefanofiorucci@gmail.com> --------- Co-authored-by: Stefano Fiorucci <stefanofiorucci@gmail.com>
This commit is contained in:
parent
ade29fcf73
commit
2280f71fee
@ -1,7 +1,7 @@
|
||||
---
|
||||
enhancements:
|
||||
- |
|
||||
Updated pipeline execution logic to use a new utility method `deepcopy_with_fallback`,
|
||||
which skips deep-copying of `Component`, `Tool`, and `Toolset` instances when used as
|
||||
runtime parameters. This prevents errors and unintended behavior caused by trying to
|
||||
deepcopy objects that contain non-copyable attributes (e.g. Jinja2 templates, clients).
|
||||
Updated pipeline execution logic to use a new utility method `_deepcopy_with_exceptions`, which attempts to deep copy an object and safely falls back to the original object if copying fails.
|
||||
Additionally `_deepcopy_with_exceptions` skips deep-copying of `Component`, `Tool`, and `Toolset` instances when used as runtime parameters.
|
||||
This prevents errors and unintended behavior caused by trying to deepcopy objects that contain non-copyable attributes (e.g. Jinja2 templates, clients).
|
||||
Previously, standard `deepcopy` was used on inputs and outputs which occasionally lead to errors since certain Python objects cannot be deepcopied.
|
||||
|
@ -1,6 +0,0 @@
|
||||
---
|
||||
fixes:
|
||||
- |
|
||||
Introduced `deepcopy_with_fallback` to improve robustness in the `Pipeline.run` method.
|
||||
Previously, standard `deepcopy` was used on inputs and outputs to avoid unintended side effects from shared mutable data structures, as these values are accessed in multiple parts of the pipeline. However, certain Python objects cannot be deepcopied, which could lead to runtime errors.
|
||||
The new `deepcopy_with_fallback` function attempts to deep copy an object and safely falls back to the original object if copying fails. This ensures pipeline execution remains stable while maintaining the protective behavior against shared-state modification.
|
Loading…
x
Reference in New Issue
Block a user