-
Notifications
You must be signed in to change notification settings - Fork 27k
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
[docs] update load_tool
#34683
[docs] update load_tool
#34683
Conversation
Signed-off-by: Lin, Fanli <[email protected]>
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.
Good catch, thanks! Can you maybe upload the tool to the Hub so we can do a more direct replacement of the existing code snippet?
Hi! 👋 I run into the same problem since it is also happening in the cookbooks.
As stated, it expects a A possible solution would be updating the m-ric/text-to-image using I could implement any of them if help is needed 😄 |
Experimenting further, I've found that when loading a tool from the hub, the method from_hub is called and in this line: transformers/src/transformers/agents/tools.py Line 352 in 25f510a
The inner code is executed: transformers/src/transformers/agents/tools.py Line 353 in 25f510a
The first value
Commenting out these two lines, the code runs correctly without any issue. cc @aymeric-roucher 😄 |
What do you think @stevhliu? |
For the other example in Agents, supercharged - Multi-agents, External tools, and more
In order to make it work, in addition to commenting out the previously mentioned lines, you must also add in that same place the following:
I think that the issue comes from:
I'm happy to review it further and generate a PR if needed 😄 |
Wow thanks so much for your investigation @sergiopaniego! I'm in favor of commenting out those two lines, but let's wait and see what @aymeric-roucher thinks 🙂 |
Well spotted @faaany and @sergiopaniego ! This is indeed due to the assignment of tool_class.inputs. I've made a fix for this input type error just a few hours ago while adding new stuff in this PR (merged now). So your issue should be fixed now! And I've manually fixed the tools, all should work now. The rendering for https://huggingface.co/spaces/m-ric/hf-model-downloads still fails in the Space (you can still pull the tool and it works properly) but will be merged in a PR very soon! |
Hi all, thanks so much for the discussion! Closing this PR, as it got fixed in @aymeric-roucher 's PR. |
What does this PR do?
This model
m-ric/text-to-image
seems to not exit anymore on the HuggingFace Model Hub. When running the example code, I got the following error:I only found this page, so I used the code from there to update the doc. If it is better to use load tool directly from model hub, pls advice me one, so I can update my PR to use a working
image_generation_tool
.@stevhliu