Unable to run helmholtz.py after installing 22.03.1

I was able to run the modulus v22.03.1 docker container but when I try to run helmholtz.py, i encountered the following error.

root@0c905d725071:/examples/helmholtz# python helmholtz.py
Traceback (most recent call last):
File “helmholtz.py”, line 4, in
from modulus.hydra import to_absolute_path, instantiate_arch, ModulusConfig
ImportError: cannot import name ‘ModulusConfig’ from ‘modulus.hydra’ (/opt/conda/lib/python3.8/site-packages/modulus-22.3-py3.8.egg/modulus/hydra/init.py)

Hi @yeokiwi ,

Thanks for your interest in Modulus.
You’re likely running version 22.07 of the examples if I had to guess. We had a lot of changes to the imports in 22.07 so things will not line up with 22.03.1 image.

Is there any reason you’re running 22.03.1 specifically? If so I can provide you the import fixes.

I downloaded 22.07 but I encountered the following issue when I ran docker:

Error processing tar file(exit status 1): unexpected EOF.

So, i downloaded 22.03.1 and it worked but I could not run the examples.

Should I redownload the 22.07 and try again?

Hi @yeokiwi ,

Yes please try again, we had some issues with the devzone image and reuploaded it. Hopefully should be fixed.

Please let me know if it does not work.

Note (for future reference) we also provide Modulus containers on NGC which can also be pulled as an alternative option: Modulus | NVIDIA NGC

Hi @ngeneva,

The installation works! Thanks.

However, I still encounter problem running the example.

root@623966b3241a:/examples/ldc# python ldc_2d.py
Error executing job with overrides:
Traceback (most recent call last):
File “ldc_2d.py”, line 82, in run
openfoam_var = csv_to_dict(
File “/modulus/modulus/utils/io/csv_rw.py”, line 33, in csv_to_dict
values = np.loadtxt(filename, skiprows=1, delimiter=delimiter, unpack=False)
File “/opt/conda/lib/python3.8/site-packages/numpy/lib/npyio.py”, line 1163, in loadtxt
chunk.append(packer(convert_row(words)))
File “/opt/conda/lib/python3.8/site-packages/numpy/lib/npyio.py”, line 1142, in convert_row
return [*map(_conv, vals)]
File “/opt/conda/lib/python3.8/site-packages/numpy/lib/npyio.py”, line 725, in _floatconv
return float(x) # The fastest path.
ValueError: could not convert string to float: ‘oid sha256:4c68adf2b0a04c53f0abd4d3920f3fec618669399638dd5ece84785f474d1fa6’

Set the environment variable HYDRA_FULL_ERROR=1 for a complete stack trace.
root@623966b3241a:/examples/ldc#

I can run the ode_spring_mass example correctly though.

Rgds

1 Like

Hi @yeokiwi ,

Looks like you don’t have Git LFS installed. We use Git LFS in our examples repo to store the data files, without LFS it will just be a pointer file. With Git LFS installed, try re-cloning the examples repo. That CSV file for LDC should now have proper data in it and the example should run.

More information about Git LFS can be found here.

3 Likes

Hi @ngeneva ,

Thanks! It’s working correctly now.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.