DiffEqML / torchdyn

A PyTorch library entirely dedicated to neural differential equations, implicit models and related numerical methods
https://torchdyn.org
Apache License 2.0
1.36k stars 125 forks source link

NeuralDE in the documentation? #86

Closed javirk closed 3 years ago

javirk commented 3 years ago

I am seeing in the docs (classification or Lagrangian neural nets tutorials) that the ODE is instantiated as NeuralDE. When I try it in my environment, with torchdyn 0.2.0, I get NameError: name 'NeuralDE' is not defined. However, the tutorials in github say it's NeuralODE, and that works for me.

Are the docs wrong or NeuralDE and NeuralODE are two different things and I'm doing something wrong?

Thanks!

javirk commented 3 years ago

Ok, I created a new environment, reinstalled torchdyn & Co. and now there are no problems with NeuralDE.

pytorch 1.9+cuda10.2
torchdyn 0.2.2.1
torchdyn 0.2.2.1
torchsde 0.2.5i

But then the tutorials are not updated. I would do a PR but I don't know if they're kept like that for some reason.

Zymrael commented 3 years ago

Hi @javirk. The docs are outdated in several places and will be massively improved for the next release planned for early July. NeuralDE is the legacy version kept for backward compatibility, which has now been replaced by NeuralODE.

Out of curiosity, did you install torchdyn via pip? 0.2.2.1 is outdated and 0.3.2 should be on PyPI.

javirk commented 3 years ago

Yes, I installed it via pip. I just tried in a blank new environment and it retrieves 0.2.2.1 for some reason. I have pip 21.1.3 (last version).

image

Zymrael commented 3 years ago

pip install torchdyn with pip 21.1.3 retrieves torchdyn==0.4.* for me at the moment, check if this works on your end as well.

javirk commented 3 years ago

Yes, it works now. Thank you very much.

I think this can be closed now.