Skip to content

Get rid of deprecated use_return_dict call. - #45815

Merged
zucchini-nlp merged 2 commits into
huggingface:mainfrom
rasmi:patch-4
May 7, 2026
Merged

Get rid of deprecated use_return_dict call.#45815
zucchini-nlp merged 2 commits into
huggingface:mainfrom
rasmi:patch-4

Conversation

@rasmi

@rasmi rasmi commented May 7, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

config.use_return_dict is deprecated (and mostly removed in #41250) , but there is one remaining call here. This raises a torch dynamo error in certain circumstances. This PR removes the last use of this deprecated method.

Code Agent Policy

  • I confirm that this is not a pure code agent PR.

Before submitting

  • This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
  • Did you read the contributor guideline,
    Pull Request section?
  • Was this discussed/approved via a Github issue or the forum? Please add a link
    to it if that's the case.
  • Did you make sure to update the documentation with your changes? Here are the
    documentation guidelines, and
    here are tips on formatting docstrings.
  • Did you write any new necessary tests?

Who can review?

@zucchini-nlp
@Rocketknight1

@zucchini-nlp zucchini-nlp left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah nice, I thought all mentions of it were replaced 馃槄

@zucchini-nlp
zucchini-nlp enabled auto-merge May 7, 2026 09:19
@github-actions

github-actions Bot commented May 7, 2026

Copy link
Copy Markdown
Contributor

[For maintainers] Suggested jobs to run (before merge)

run-slow: mbart

@zucchini-nlp
zucchini-nlp added this pull request to the merge queue May 7, 2026
@HuggingFaceDocBuilderDev

Copy link
Copy Markdown

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.

Merged via the queue into huggingface:main with commit 28ab024 May 7, 2026
23 checks passed
louzongzhi pushed a commit to louzongzhi/transformers that referenced this pull request May 11, 2026
Co-authored-by: Raushan Turganbay <raushan@huggingface.co>
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.

3 participants