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

model.generate doesn't validate kwargs #18130

Closed
stas00 opened this issue Jul 14, 2022 · 4 comments · Fixed by #18261
Closed

model.generate doesn't validate kwargs #18130

stas00 opened this issue Jul 14, 2022 · 4 comments · Fixed by #18261
Assignees

Comments

@stas00
Copy link
Contributor

stas00 commented Jul 14, 2022

Feature request

I made a mistake in a script:

model.generate(**tokens, in_length=num_tokens)

missing m in min_length and I was puzzling over why I was getting unexpected results (as it was using the default value which was quite different from mine)

Would it be possible to have generate validate its input and assert on unexpected args?

Thank you!

@patrickvonplaten

@LysandreJik
Copy link
Member

cc @gante as well

@gante
Copy link
Member

gante commented Jul 14, 2022

Hi @stas00 👋 -- we do have a plan for it. The rough sketch is here, and I will pick it up after the last wrinkles related to TF generate have been ironed out (which should be very soon!)

@gante gante self-assigned this Jul 14, 2022
@stas00
Copy link
Contributor Author

stas00 commented Jul 14, 2022

excellent. Thank you, @gante!

I guess let's keep this Issue open for tracking unless there is another one already?

@gante
Copy link
Member

gante commented Jul 15, 2022

Yeah, let's keep this one open!

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