Fix: Remove redundant @can_return_tuple conflicting with @capture_out… - #47733
Conversation
|
run-slow: lasr, llama4, mllama, nemotron_asr_streaming, parakeet, pe_audio, pe_audio_video, pe_video |
|
This comment contains models: ["models/lasr", "models/llama4", "models/mllama", "models/nemotron_asr_streaming", "models/parakeet", "models/pe_audio", "models/pe_audio_video", "models/pe_video"] |
|
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. |
|
[For maintainers] Suggested jobs to run (before merge) run-slow: lasr, llama4, mllama, nemotron_asr_streaming, parakeet, pe_audio, pe_audio_video, pe_video |
CI recapDashboard: View test results in Grafana |
What does this PR do?
Fixes all
forwardcalls that combine@can_return_tuplewith@capture_outputs. The two are not compatible because they both popreturn_dictfrom the kwargs which results in only the outermost decorator seeing the true value.@can_return_tupleis redundant in this case because@capture_outputsalready handles tuples.This PR comes a new mlinter rule that checks for this issue: huggingface/transformers-mlinter#14
Code Agent Policy
The Transformers repo is currently being overwhelmed by a large number of PRs and issue comments written by
code agents. These often are low-quality, or fix extremely minor issues that occur rarely or never in practice.
As a result, we're instituting a rule that first-time contributors should not use code agents to submit PRs or issues.
We'd also ask autonomous "OpenClaw"-like agents not to open any PRs or issues.
Issues/PRs from first-time contributors that violate this rule will probably just be closed without review, and we
might block you, especially if you open more than one or appear to be deliberately ignoring this. We especially do not
want new contributors to jump in on random issues to contribute an agent-written fix. This creates lots of noise
for reviewers and other users and will almost certainly get you blocked.
For more information, please read
CONTRIBUTING.md.Before submitting
Pull Request checks?
to it if that's the case.
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.
@vasqu @molbap