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?
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.
File βhelmholtz.pyβ, line 4, in
from modulus.hydra import to_absolute_path, instantiate_arch, ModulusConfig
ModuleNotFoundError: No module named βmodulus.hydraβ
The thing is that I did the course about PINNs ( Introduction to Physics-informed Machine Learning with Modulus) in this course you provided some code examples in Python notebooks, but when I tried to run this code in my local container I faced some issues trying to import libraries.
The version of the modulus package is 0.5.0, do you provide this course in another version of modulus? because it only runs in your launchpad, and I need to run this locally. The error ( no one in this package can be imported)
from modulus.hydra import to_yaml
from modulus.hydra.utils import compose
from modulus.hydra.config import ModulusConfig
ModuleNotFoundError Traceback (most recent call last) Cell In[6], line 21 import modulus ----> 2 from modulus.hydra import to_yaml 3 from modulus.hydra.utils import compose 4 from modulus.hydra.config import ModulusConfig ModuleNotFoundError: No module named βmodulus.hydraβ.
Please let me know how to import this in modulus version 0.5.0.
Hi Guys I found that to have this working we need to import these packages in the way:
from modulus.sym.hydra import to_yaml
from modulus.sym.hydra.utils import compose
from modulus.sym.hydra.config import ModulusConfig
We need to add the sym package, similar to these others:
import modulus
from modulus.sym.hydra import ModulusConfig, instantiate_arch
from modulus.sym.solver import Solver
from modulus.sym.domain import Domain
from modulus.sym.geometry.primitives_1d import Line1D
from modulus.sym.geometry import Parameterization
from modulus.sym.domain.constraint import (
PointwiseBoundaryConstraint,
PointwiseInteriorConstraint,
)
from modulus.sym.domain.validator import PointwiseValidator
from modulus.sym.domain.monitor import PointwiseMonitor
from modulus.sym.key import Key
from modulus.sym.node import Node
from modulus.sym.eq.pde import PDE
In this way for me is working with the latest version of modulus ( the examples provided in the course
Introduction to Physics-informed Machine Learning with Modulus by Nvidia).
Best,