huggingface / transformers

🤗 Transformers: State-of-the-art Machine Learning for Pytorch, TensorFlow, and JAX.
https://huggingface.co/transformers
Apache License 2.0
132.19k stars 26.33k forks source link

Unused variable in test_pipelines_text_generation.py function #32397

Open jacorobe opened 1 month ago

jacorobe commented 1 month ago

https://github.com/huggingface/transformers/blob/c1aa0edb48217f416f4bbe6e3a9db1500284513b/tests/pipelines/test_pipelines_text_generation.py#L323-L325

TextGenerationPipeline parameter, processor, is unused within this scope of the function. Uncertain if this test is incomplete or if this variable is optional and potentially removeable.

ArthurZucker commented 1 month ago

Seems like a lot of places don't use it cc @ydshieh Do you want to open a PR and fix it ? 🤗

ydshieh commented 1 month ago

I believe it's just a general pattern: we want to have get_test_pipeline having a uniform argument list. But inside the body, only parts of them are used, depends on the pipeline class.

I don't feel strong the need to change it. But if we decide to do it, I would prefer after #32514 being done and merged

github-actions[bot] commented 5 days ago

This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the contributing guidelines are likely to be ignored.