-
Notifications
You must be signed in to change notification settings - Fork 27.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: TextIteratorStreamer cannot work with pipeline #23641
Conversation
The documentation is not available anymore as the PR was closed or merged. |
Deepcopying the TextIteratorStreamer object causes the exception. Signed-off-by: yuanwu <yuan.wu@intel.com>
@sgugger , pls help review, thx. |
@gante Please help to review. |
I ran into the same issue and also had another issue about a week ago (which I don't remember now) that was also related to the deepcopy operation. If the sole purpose of the deep copy is to allow calls to |
@gante We used the transformers pipeline with TextIteratorStreamer for chatbot, but it raised the deepcopy exception. Can you help to check the issue and review the PR? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apologies for the long delay 🤗 Have a look at the suggestion I added, I believe it solves the problem while keeping it short!
Got it. I will update the patch. Co-authored-by: Joao Gante <joaofranciscocardosogante@gmail.com>
Do I need to fix these test failures which are not related with this patch? @gante |
@yuanwu2017 to get rid of the CI errors, please rebase the PR. It is a hard requirement -- LMK if you need instructions to do so :) |
Co-authored-by: Joao Gante <joaofranciscocardosogante@gmail.com>
@amyeroberts see the issue here, which explains why this copy is not needed :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for fixing!
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. |
* fix: TextIteratorStreamer cannot work with pipeline Deepcopying the TextIteratorStreamer object causes the exception. Signed-off-by: yuanwu <yuan.wu@intel.com> * Update src/transformers/pipelines/text_generation.py Got it. I will update the patch. Co-authored-by: Joao Gante <joaofranciscocardosogante@gmail.com> * Update src/transformers/pipelines/text_generation.py Co-authored-by: Joao Gante <joaofranciscocardosogante@gmail.com> * Update text_generation.py --------- Signed-off-by: yuanwu <yuan.wu@intel.com> Co-authored-by: Joao Gante <joaofranciscocardosogante@gmail.com>
Deepcopying the TextIteratorStreamer object causes the exception.
What does this PR do?
Fixes #23552
Before submitting
Pull Request section?
to it if that's the case.
documentation guidelines, and
here are tips on formatting docstrings.
Who can review?
Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.