-
Notifications
You must be signed in to change notification settings - Fork 234
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
add --trust_remote_code
for text generation examples
#870
Conversation
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.
LGTM otherwise, minor comment regarding the help message
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.
This one is tricky as remote code offers absolutely no guarantee of compliance with the Transformers API. I've pushed back against it in the past because this example will for sure fail with at least a few models with remote code out there.
I'm okay with allowing it, but let's log a warning that clearly states that trust_remote_code
is true so this example may fail as this model doesn't necessarily follow the Transformers API.
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
Adding warning print as suggested by @regiss
Co-authored-by: regisss <15324346+regisss@users.noreply.github.com>
Co-authored-by: Sayantan Sarkar <supersarkar@gmail.com> Co-authored-by: regisss <15324346+regisss@users.noreply.github.com>
Thanks for the quick workaround but I am still seeing the error $git status File "/usr/local/lib/python3.10/dist-packages/transformers/dynamic_module_utils.py", line 621, in resolve_trust_remote_code |
@ImtiazSajwani Could you share the command to reproduce this error? |
Add
--trust_remote_code
argument for text generation examples to allow the custom models defined on the Hub in their own modeling files.