Skip to content

Remove super call from EncoderDecoderCache init#39786

Closed
manueldeprada wants to merge 1 commit intohuggingface:mainfrom
manueldeprada:fix-enc-dec-init
Closed

Remove super call from EncoderDecoderCache init#39786
manueldeprada wants to merge 1 commit intohuggingface:mainfrom
manueldeprada:fix-enc-dec-init

Conversation

@manueldeprada
Copy link
Copy Markdown
Contributor

@manueldeprada manueldeprada commented Jul 30, 2025

EncoderDecoderCache is a wrapper around two caches. Thus, it should not call super() to initialize self.layers or self.layer_classes.

This can create bugs since other parts of the code might try to access those attributes.

The call was added on #39590

@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.

@Cyrilvallez
Copy link
Copy Markdown
Member

Already part of #39797! 🤗

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