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

optimizer.step() does not check if the parameter has gradient #100

Open
linyuhongg opened this issue Aug 1, 2024 · 1 comment
Open

optimizer.step() does not check if the parameter has gradient #100

linyuhongg opened this issue Aug 1, 2024 · 1 comment
Labels
good first issue Good for newcomers

Comments

@linyuhongg
Copy link

linyuhongg commented Aug 1, 2024

Currently, the optimizer does not check whether the parameters have gradients when calling .step(), It could be valuable to return a warning.

This could be checked in get_gradient_and_context_text function of optimizer.py.

@mertyg mertyg added the good first issue Good for newcomers label Aug 2, 2024
@mertyg
Copy link
Member

mertyg commented Aug 2, 2024

great point.. we should add this in the next release. thank you @linyuhongg !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants