From 66f152509ba89a21393ded1b00c25f75369cd2ad Mon Sep 17 00:00:00 2001 From: Kaustubh Tangsali <71059996+ktangsali@users.noreply.github.com> Date: Thu, 21 Nov 2024 18:37:15 -0800 Subject: [PATCH] Update pillow library to fix CVE, update docs (#210) --- Dockerfile | 2 +- docs/api/modulus.sym.models.rst | 7 +++++++ modulus/sym/eq/phy_informer.py | 3 ++- modulus/sym/eq/spatial_grads/spatial_grads.py | 2 +- pyproject.toml | 2 +- 5 files changed, 12 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 3b7b1162..40c17084 100644 --- a/Dockerfile +++ b/Dockerfile @@ -48,7 +48,7 @@ RUN if [ "$TARGETPLATFORM" = "linux/arm64" ] && [ -e "/modulus-sym/deps/vtk-9.2. # Install modulus sym dependencies RUN pip install --no-cache-dir "hydra-core>=1.2.0" "termcolor>=2.1.1" "chaospy>=4.3.7" "Cython==0.29.28" "numpy-stl==2.16.3" "opencv-python>=4.8.1.78" \ "scikit-learn>=1.0.2" "symengine>=0.10.0" "sympy>=1.12" "timm>=1.0.3" "torch-optimizer==0.3.0" "transforms3d==0.3.1" \ - "typing==3.7.4.3" "pillow==10.2.0" "notebook>=7.2.2" "mistune==2.0.3" "pint==0.19.2" "tensorboard>=2.8.0" + "typing==3.7.4.3" "pillow==10.3.0" "notebook>=7.2.2" "mistune==2.0.3" "pint==0.19.2" "tensorboard>=2.8.0" # Install warp-lang RUN pip install --no-cache-dir warp-lang diff --git a/docs/api/modulus.sym.models.rst b/docs/api/modulus.sym.models.rst index 013b0b5b..5e6ca2ed 100644 --- a/docs/api/modulus.sym.models.rst +++ b/docs/api/modulus.sym.models.rst @@ -8,6 +8,13 @@ models.afno :members: AFNOArch :show-inheritance: +models.deeponet +------------------------------- + +.. automodule:: modulus.sym.models.deeponet + :members: DeepONetArch + :show-inheritance: + models.dgm ------------------------------- diff --git a/modulus/sym/eq/phy_informer.py b/modulus/sym/eq/phy_informer.py index bfaaccf2..c7353aed 100644 --- a/modulus/sym/eq/phy_informer.py +++ b/modulus/sym/eq/phy_informer.py @@ -89,7 +89,8 @@ class PhysicsInformer: The `.forward` call requires input dict with the relevant variables in `[N, 1, H, W, D]` for 3D, `[N, 1, H, W]` for 2D and `[N, 1, H]` for 1D. `least_squares`: The spatial gradients are computed using Least Squares - technique. Ideal for use with mesh based representations. All values are + technique. Ideal for use with mesh based representations (i.e. unstructured + grids). All values are computed at the nodes. The `.forward` call requires input dict with the relevant variables in `[N, 1]` shape along with entry for "coordinates" in `[N, m]` shape where m is the dimensionality of the input diff --git a/modulus/sym/eq/spatial_grads/spatial_grads.py b/modulus/sym/eq/spatial_grads/spatial_grads.py index 5e133592..424ecc73 100644 --- a/modulus/sym/eq/spatial_grads/spatial_grads.py +++ b/modulus/sym/eq/spatial_grads/spatial_grads.py @@ -651,7 +651,7 @@ def forward(self, input_dict): class GradientsLeastSquares(torch.nn.Module): """ Compute spatial derivatives using Least Squares technique modified to compute - gradients on nodes. + gradients on nodes. Useful for mesh based representations (i.e. unstructured grids) Reference: https://scientific-sims.com/cfdlab/Dimitri_Mavriplis/HOME/assets/papers/aiaa20033986.pdf diff --git a/pyproject.toml b/pyproject.toml index eeb0735b..7c2e23cb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -22,7 +22,7 @@ dependencies = [ "numpy-stl>=2.16,<2.17", "nvidia-modulus>=0.2.0", "opencv-python>=4.8.1.78", - "pillow>=10.2,<10.3", + "pillow>=10.3,<10.4", "pint>=0.19.2", "scikit-learn>=1.2.0", "symengine>=0.10.0",