gptkzm
March 23, 2023, 9:24am
1
Hello,
I am a beginner in deep learning and PINNs, and I have enjoyed using Modulus in the container. However, I would like to try it on the bare metal as well, so I can use jupyter notebook.
I followed the tutorial to install Modulus on Ubuntu 22.04, but I encountered an error when I ran the helmholtz.py example:
from modulus.hydra import to_absolute_path, instantiate_arch, ModulusConfig ModuleNotFoundError: No module named βmodulus.hydraβ
I tried to change the version of hydra.core==1.1.1, but it did not help. I am not sure what went wrong during the installation process. Could you please give me some advice or guidance on how to fix this issue?
Thank you very much.
1 Like
Hi @gptkzm
This looks like Modulus was not properly installed fully. modulus.hydra
lives in the Modulus package. So I would double check your Modulus install.
Hello,
I have a similar issue using Google Collab. When the code is inside a python file and executed by command:
!python example.py
then it works. When I put the code directly into the notebook, then I have the error:
ModuleNotFoundError: No module named 'modulus.hydra'
There is no error during modulus installation.
Hi @mateusz10
Where did you install from (what repo did you clone)?
I cloned the official repo (I guess):
@gitlab.com/nvidia/modulus/modulus.git
It is the same version number as OPβs.
Finished processing dependencies for modulus==22.9
@mateusz10
This error is because it seems Modulus the package is not completely installed for some reason (not necessarily related to the dependencies). I would check the installation location of the modulus package to see if all the files are there.
Can also check other imports such as from modulus.key import Key
works. If this also fails, Modulus is not installed.
Other imports also fail. But what is strange for me is that Modulus works when I execute it from a python file.
I checked the installation location:
/content/modulus/build/lib/modulus
- correct me if I am wrong
and get the following structure. Looks like Hydra is in there.
βββ constants.py
βββ dataset
β βββ continuous.py
β βββ dataset.py
β βββ discrete.py
β βββ __init__.py
βββ distributed
β βββ helpers.py
β βββ __init__.py
β βββ manager.py
βββ domain
β βββ constraint
β β βββ constraint.py
β β βββ continuous.py
β β βββ discrete.py
β β βββ __init__.py
β β βββ utils.py
β βββ domain.py
β βββ inferencer
β β βββ inferencer.py
β β βββ __init__.py
β β βββ ov.py
β β βββ pointwise.py
β β βββ voxel.py
β β βββ vtkpointwise.py
β βββ __init__.py
β βββ monitor
β β βββ __init__.py
β β βββ monitor.py
β β βββ pointwise.py
β βββ validator
β βββ continuous.py
β βββ discrete.py
β βββ __init__.py
β βββ validator.py
βββ eq
β βββ derivatives.py
β βββ __init__.py
β βββ mfd
β β βββ finite_derivatives.py
β β βββ functions.py
β β βββ __init__.py
β βββ non_dim.py
β βββ pde.py
β βββ pdes
β βββ advection_diffusion.py
β βββ basic.py
β βββ diffusion.py
β βββ electromagnetic.py
β βββ energy_equation.py
β βββ __init__.py
β βββ linear_elasticity.py
β βββ navier_stokes.py
β βββ signed_distance_function.py
β βββ turbulence_zero_eq.py
β βββ wave_equation.py
βββ geometry
β βββ adf.py
β βββ curve.py
β βββ discrete_geometry.py
β βββ geometry.py
β βββ helper.py
β βββ __init__.py
β βββ parameterization.py
β βββ primitives_1d.py
β βββ primitives_2d.py
β βββ primitives_3d.py
β βββ tessellation.py
βββ graph.py
βββ hydra
β βββ arch.py
β βββ callbacks.py
β βββ config.py
β βββ graph.py
β βββ help.yaml
β βββ hydra.py
β βββ __init__.py
β βββ loss.py
β βββ metric.py
β βββ optimizer.py
β βββ pde.py
β βββ profiler.py
β βββ scheduler.py
β βββ training.py
β βββ utils.py
βββ __init__.py
βββ key.py
βββ loss
β βββ aggregator.py
β βββ __init__.py
β βββ loss.py
βββ manager.py
βββ models
β βββ afno
β β βββ afno.py
β β βββ distributed
β β β βββ afno.py
β β β βββ __init__.py
β β β βββ layers.py
β β β βββ mappings.py
β β βββ __init__.py
β βββ arch.py
β βββ deeponet.py
β βββ dgm.py
β βββ fno.py
β βββ fourier_net.py
β βββ fully_connected.py
β βββ fused_mlp.py
β βββ hash_encoding_net.py
β βββ highway_fourier_net.py
β βββ __init__.py
β βββ interpolation.py
β βββ layers
β β βββ activation.py
β β βββ dgm_layers.py
β β βββ fourier_layers.py
β β βββ fully_connected_layers.py
β β βββ __init__.py
β β βββ siren_layers.py
β β βββ spectral_layers.py
β β βββ weight_norm.py
β βββ modified_fourier_net.py
β βββ moving_time_window.py
β βββ multiplicative_filter_net.py
β βββ multiscale_fourier_net.py
β βββ pix2pix.py
β βββ radial_basis.py
β βββ siren.py
β βββ super_res_net.py
β βββ utils.py
βββ node.py
βββ solver
β βββ __init__.py
β βββ multidomain.py
β βββ sequential.py
β βββ solver.py
βββ test
β βββ __init__.py
β βββ run_tests.py
β βββ test_derivatives.py
β βββ test_geometry.py
β βββ test_graph.py
β βββ test_interpolation.py
β βββ test_loss.py
β βββ test_meshless_finite_dirv.py
β βββ test_models
β β βββ __init__.py
β β βββ model_test_utils.py
β β βββ test_activation.py
β β βββ test_afno.py
β β βββ test_arch.py
β β βββ test_deeponet.py
β β βββ test_dgm.py
β β βββ test_fno.py
β β βββ test_fourier_net.py
β β βββ test_fully_connected.py
β β βββ test_func_arch.py
β β βββ test_fused_mlp.py
β β βββ test_highway_fourier.py
β β βββ test_modified_fourier.py
β β βββ test_multiplicative_filter.py
β β βββ test_multiscale_fourier.py
β β βββ test_pix2pix.py
β β βββ test_radial_basis.py
β β βββ test_siren.py
β β βββ test_super_res.py
β βββ test_spectral_convs.py
β βββ test_sympy_node.py
β βββ test_sympy_printer.py
β βββ test_tesselated_geometry.py
βββ trainer.py
βββ utils
βββ benchmark
β βββ benchmark.py
β βββ __init__.py
βββ __init__.py
βββ io
β βββ csv_rw.py
β βββ field.py
β βββ __init__.py
β βββ plotter.py
β βββ time_series.py
β βββ vtk.py
βββ sympy
β βββ functions.py
β βββ __init__.py
β βββ numpy_printer.py
β βββ torch_printer.py
βββ training
β βββ stop_criterion.py
βββ vpinn
βββ __init__.py
βββ integral.py
βββ test_functions.py
26 directories, 168 files
I found the solution, which is restart the Runtime :-)
I have the same issue here.
File βhelmholtz.pyβ, line 4, in
from modulus.hydra import to_absolute_path, instantiate_arch, ModulusConfig
ModuleNotFoundError: No module named βmodulus.hydraβ
However, when I run python 3.8 and run
from modulus.key import Key
it works.
Any ideas?
@wolkerstorfergloria whats your environment and what version of Modulus are you using?
You have the worst documentation and very hard to install your library very very bad
1 Like
cpe.sk
November 2, 2023, 8:08pm
12
Same here.
Iβm trying to install using:
pip install nvidia-modulus nvidia-modulus-launch nvidia-modulus-sym
And I got the same error:
from modulus.hydra import to_absolute_path, ModulusConfig, instantiate_arch
ModuleNotFoundError: No module named 'modulus.hydra'
Please help.