facebookresearch / schedule_free

Schedule-Free Optimization in PyTorch
Apache License 2.0
1.91k stars 65 forks source link

Add type hints #35

Closed stecklin closed 4 months ago

stecklin commented 4 months ago

Added type hints as discussed in https://github.com/facebookresearch/schedule_free/issues/34.

For params and lr, I used the same type hints as torch's SGD / Adam optimizers which are a bit more generic than what is mentioned in the schedulefree doc strings. Feel free to change it if you're not happy with my current version.

adefazio commented 4 months ago

Thank you! I will do a release in the next few days including this change.