hahnec / torchimize

numerical optimization in pytorch
https://hahnec.github.io/torchimize/
GNU General Public License v3.0
130 stars 7 forks source link

change stateless to torch.func to avoid warning information #7

Closed AtaraxiaZ closed 8 months ago

AtaraxiaZ commented 8 months ago

Hey, PyTorch 2.0 don't use stateless.functional_call any more, so I change it all to the drop in replacement torch.func.functional_call

AtaraxiaZ commented 8 months ago

The unit test has passed, but the github action seems to have a bug.

hahnec commented 8 months ago

Thanks for the PR. I have pulled and merged your solution. I included a torch version check here to pass tests and remain backwards compatible. This is covered in pip install torchimize >= 0.0.16 onwards.