Ensure DAG pipeline isolates node inputs#10
Ensure DAG pipeline isolates node inputs#10robitec97 wants to merge 3 commits intodatapizza-labs:mainfrom
Conversation
…implementation-of-deepcopy Ensure DAG pipeline isolates node inputs
|
Hi Roby, i noticed you referenced the Issue #2. I avoided submitting a PR on this as i have no real Infos of the future intents about deepcopy usage, as Is pretty damn expensive on performances. Still waiting on a clarification from dp Dev team on It. |
|
Hello Andrea, you’re absolutely right. I’m so sorry! :) I’ll remove my PR, I really didn’t mean to take any credit. |
|
@robitec97 Sorry Bro i didn't mean to remove the PR, i Just meant that i needed more Infos about that from the Dev team, i have absolutely no problems with you submitting a PR for Issue #2, i Just wanted to add more context. Your PR is legit, keep It open imo |
|
We haven't added deepcopy yet because we get an error while deepcopying the memory returned by ChatPromptTemplate "TypeError: Template.new() missing 1 required positional argument: 'source'" |
|
Grazie @Federaffo for the hint, i'll be looking on this. Constructors apparently do not accept the empty invocation, could possibly use a more complex template to handle/avoid deepcopying the Jinja templates. |
Hello,
I've tried to fix a few things mentioned in your issue: #2
Ensured _get_args_for_node deep copies dependency values so DAG pipeline nodes receive isolated inputs rather than shared references.
Added a regression test confirming branches that share a source node get independent copies even when one consumer mutates its input.
Testing