lu-group / sbinn

SBINN: Systems-biology informed neural network
Apache License 2.0
28 stars 17 forks source link

epochs is deprecated and will be removed in a future version. Use iterations instead. #12

Closed penguinaugustus closed 1 year ago

penguinaugustus commented 1 year ago

Hi, Professor @lululxvi, I was trying to run sbinn_pytorch.py and got the following error:

(base) yufu@Yus-MacBook-Pro sbinn % python sbinn_pytorch.py
Using backend: pytorch
Other supported backends: tensorflow.compat.v1, tensorflow, jax, paddle.
paddle supports more examples now and is recommended.
Compiling model...
'compile' took 0.000078 s

Warning: epochs is deprecated and will be removed in a future version. Use iterations instead.
Training model...

zsh: segmentation fault  python sbinn_pytorch.py

It seem that there is something wrong with version. my DeepXDE's version is 1.9.1 and my pytorch's version is 2.0.1. Could you provide some insight on this and maybe a possible solution to mitigate this issue?

Best, Yu.

mitchelldaneker commented 1 year ago

Hello Yu,

When the code was written, we were using an older version of DeepXDE. In the new version, we use iterations instead of epochs, hence the depreciated warning. A simple change of parameter names will fix this for you.

penguinaugustus commented 1 year ago

It works! Thank you so much.