Skip to content

Conversation

cyyever
Copy link
Contributor

@cyyever cyyever commented Oct 6, 2025

What does this PR do?

Remove unused arguments detected by pylint.

Signed-off-by: Yuanyuan Chen <[email protected]>
@cyyever cyyever changed the title Remove unused arguments Remove unused function patameters Oct 6, 2025
@Rocketknight1
Copy link
Member

Hi @cyyever, did you check that there were no calls to these functions that passed the parameters, even if they're unused inside the function itself?

@cyyever
Copy link
Contributor Author

cyyever commented Oct 6, 2025

@Rocketknight1 They were verified by grepping

~/transformers ❯ grep MoshiConverter -r *
src/transformers/models/kyutai_speech_to_text/convert_kyutai_speech_to_text_to_hf.py:from transformers.convert_slow_tokenizer import MoshiConverter
src/transformers/models/kyutai_speech_to_text/convert_kyutai_speech_to_text_to_hf.py:    tokenizer = MoshiConverter(tokenizer_path).converted()
src/transformers/models/moshi/convert_moshi_transformers.py:from transformers.convert_slow_tokenizer import MoshiConverter
src/transformers/models/moshi/convert_moshi_transformers.py:        tokenizer = MoshiConverter(args.tokenizer_vocab_path).converted()
src/transformers/convert_slow_tokenizer.py:class MoshiConverter(SpmConverter):
tests/models/moshi/test_tokenization_moshi.py:from transformers.convert_slow_tokenizer import MoshiConverter
tests/models/moshi/test_tokenization_moshi.py:            tokenizer_object=MoshiConverter(vocab_file=SAMPLE_VOCAB).converted(),
tests/models/moshi/test_tokenization_moshi.py:            tokenizer_object=MoshiConverter(vocab_file=SAMPLE_VOCAB).converted(),
tests/models/moshi/test_tokenization_moshi.py:                tokenizer_object=MoshiConverter(vocab_file=f.name).converted(),
~/transformers ❯ grep _init_added_embeddings_weights_with_mean -r *
src/transformers/modeling_utils.py:                    self._init_added_embeddings_weights_with_mean(
src/transformers/modeling_utils.py:                self._init_added_embeddings_weights_with_mean(
src/transformers/modeling_utils.py:    def _init_added_embeddings_weights_with_mean(
src/transformers/modeling_utils.py:        self._init_added_embeddings_weights_with_mean(old_lm_head, new_lm_head, old_num_tokens, added_num_tokens)

@Rocketknight1 Rocketknight1 enabled auto-merge (squash) October 6, 2025 15:29
Copy link
Member

@Rocketknight1 Rocketknight1 left a comment

Choose a reason for hiding this comment

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

Alright, happy to merge in that case. Thanks for the PR!

@Rocketknight1 Rocketknight1 merged commit 39b0c94 into huggingface:main Oct 6, 2025
25 checks passed
@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.

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