zabaras / transformer-physx

Transformers for modeling physical systems
https://zabaras.github.io/transformer-physx/
MIT License
127 stars 32 forks source link

Error cell [14] issubclass() arg 1 must be a class #6

Open DanD364 opened 1 year ago

DanD364 commented 1 year ago

Hello,

Thank you very much for this amazing work. I am trying to understand a bit better differentiable physics for fluid dynamics and this would help me a lot.

However when I am trying to run your code there is an error on cell 14 that I was unable to solve. Maybe due to an update of HfArgumentParser? Everything ran well on the previous cells (except for a small typo on cell 5 where there were some spaces after the '%' sign but that's straight forward to fix)

Do you have an idea on how to fix it and run your code?

Thank you very much

Fluid_error
NickGeneva commented 1 year ago

Hi @DanD364

This looks like a problem with the HfArgParser and some Python magic it uses. For Python 3.9 I have to hack around a solution to get it to function. By now its likely out of date for python 3.10, so maybe try downgrading to python 3.9?

edwardsmith999 commented 1 year ago

Thank you for an interesting paper and making the package available.

I have a student trying to reproduce the cylinder results on Colab, but as it is now 3.10 by default it returns the above error. To go to Python3.9 downgrading is needed. Trying the technique here: https://stackoverflow.com/questions/68657341/how-can-i-update-google-colabs-python-version 3.8 replaced by 3.10 causes a

WARNING: The following packages were previously imported in this runtime:
      [cycler,kiwisolver]
     You must restart the runtime in order to use newly installed versions"

and a crash when "restart runtime" is clicked.

Given downgrading Python seems to be impossible, would it be possible to fix for later versions of Python?

edwardsmith999 commented 1 year ago

Just created a pull request which seems to fix for Python 3.10