Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unused variable in test_pipelines_text_generation.py function #32397

Closed
jacorobe opened this issue Aug 3, 2024 · 3 comments · May be fixed by #32574
Closed

Unused variable in test_pipelines_text_generation.py function #32397

jacorobe opened this issue Aug 3, 2024 · 3 comments · May be fixed by #32574

Comments

@jacorobe
Copy link

jacorobe commented Aug 3, 2024

def get_test_pipeline(self, model, tokenizer, processor, torch_dtype="float32"):
text_generator = TextGenerationPipeline(model=model, tokenizer=tokenizer, torch_dtype=torch_dtype)
return text_generator, ["This is a test", "Another test"]

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
Copy link
Collaborator

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

@ydshieh
Copy link
Collaborator

ydshieh commented Aug 14, 2024

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

Copy link

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.

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 a pull request may close this issue.

3 participants