Skip to content
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

Remove remote code warning #36285

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

Rocketknight1
Copy link
Member

@Rocketknight1 Rocketknight1 commented Feb 19, 2025

When trust_remote_code=True is passed to a non-Auto class, the class raises a warning that the argument has no effect, but continues.

This warning is getting thrown because some of our pipelines are passing the trust_remote_code kwarg through to the model. Users can't avoid this because trust_remote_code is required for the pipeline. I can dig into that in future, to make sure unnecessary args aren't going to model.from_pretrained() but for now I think we can just remove this warning because it's kind of pointless and our code needs fewer warnings anyway ✨

Fixes #36273

@Rocketknight1
Copy link
Member Author

cc @ArthurZucker @Cyrilvallez for review!

@Rocketknight1 Rocketknight1 force-pushed the remove_pipeline_warning branch from 551db8e to 7121b5f Compare February 19, 2025 15:12
@HuggingFaceDocBuilderDev

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.

@kylesayrs
Copy link
Contributor

This change is also nice for reducing warnings in automated tests

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Loading a pipeline with trust_remote_code=True raises warning
3 participants