Skip to content

Commit b9aa3dd

Browse files
coreyjadamsmnabiandreamtalen
authored
Refactor (#1224)
* Move filesystems and version_check to core * Fix version check tests * Reorganize distributed, domain_parallel, and begin nn / utils cleanup. * Move modules and meta to core. Move registry to core. No tests fixed yet. * Add missing init files * Update build system and specify some deps. * Reorganize tests. * Update init files * Clean up neighbor tools. * Update testing * Fix compat tests * Move core model tests to tests/core/ * Add import lint config * Relocate layers * Move graphcast utils into model directory * Relocating util functionalities. * Further clean up and organize tests. * utils tests are passing now * Cleaning up distributed tests * Patching tests working again in nn * Fix sdf test * Fix zenith angle tests * Some organization of tests. Checkpoints is moved into utils. * Remove launch.utils and launch.config. Checkpointing is moved to phsyicsnemo.utils, launch.config is just gone. It was empty. * Most nn tests are passing * Further cleanup. Getting there! * Remove constants file * Add import linting to pre-commit. * Update crash readme (#1212) * update license headers- second try * update readme * Bump multi-storage-client to v0.33.0 with rust client (#1156) * Move gnn layers and start to fix several model tests. * AFNO is now passing. * Rnn models passing. * Fix improt * Healpix tests are working * Domino and unet working * Add jaxtyping to requirements.txt for crash sample (#1218) * update license headers- second try * Update requirements.txt * Updating to address some test issues * MGN tests passing again * Most graphcast tests passing again * Move nd conv layers. * update fengwu and pangu * Update sfno and pix2pix test * update tests for figconvnet, swinrnn, superresnet * updating more models to pass * Update distributed tests, now passing. * Domain parallel tests now passing. * Fix active learning imports so tests pass in refactor * Fix some metric imports * Remove deploy package * Remove unused test file * unmigrate these files ... again? * Update import linter. --------- Co-authored-by: Mohammad Amin Nabian <[email protected]> Co-authored-by: Yongming Ding <[email protected]>
1 parent 32e1dce commit b9aa3dd

File tree

159 files changed

+621
-1283
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

159 files changed

+621
-1283
lines changed

.importlinter

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ containers=
99
physicsnemo
1010
layers =
1111
experimental
12+
diffusion | active_learning
1213
models : registry : datapipes : metrics : domain_parallel
1314
nn
1415
utils
@@ -44,7 +45,7 @@ type = layers
4445
containers=
4546
physicsnemo.utils
4647
layers =
47-
mesh
48+
mesh | insolation | zenith_angle
4849
profiling
4950
checkpoint
5051
capture
@@ -58,10 +59,17 @@ containers=
5859
layers =
5960
fourier_layers | transformer_layers
6061
dgm_layers | mlp_layers | fully_connected_layers | gnn_layers
61-
activations | attention_layers | ball_query | conv_layers | drop | fft | fused_silu | interpolation | kan_layers | patching | resample_layers | sdf | siren_layers | spectral_layers | transformer_decoder | weight_fact | weight_norm
62+
activations | attention_layers | ball_query | conv_layers | drop | fft | fused_silu | interpolation | kan_layers | resample_layers | sdf | siren_layers | spectral_layers | transformer_decoder | weight_fact | weight_norm
6263
neighbors
6364
utils
6465

66+
[importlinter:contract:physicsnemo-diffusion]
67+
name = Control Dependencies in PhysicsNeMo diffusion
68+
type = layers
69+
containers=
70+
physicsnemo.diffusion
71+
layers =
72+
patching
6573

6674
[importlinter:contract:physicsnemo-models]
6775
name = Prevent Imports between physicsnemo models
@@ -72,5 +80,4 @@ layers =
7280
mesh_reduced
7381
afno | dlwp | dlwp_healpix | domino | dpot | fengwu | figconvnet | fno | graphcast | meshgraphnet | pangu | pix2pix | rnn | srrn | swinvrnn | topodiff | transolver | vfgn
7482
unet | diffusion | dlwp_healpix_layers
75-
utils
7683

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
5151
- Support passing custom tokenizer, detokenizer, and attention `Module`s in
5252
experimental DiT architecture
5353
- Improved Transolver training recipe's configuration for checkpointing and normalization.
54+
- Bumped `multi-storage-client` version to 0.33.0 with rust client.
5455

5556
### Deprecated
5657

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ RUN pip install --no-cache-dir "black==22.10.0" "interrogate==1.5.0" "coverage==
213213
RUN pip install --no-cache-dir "numpy-stl" "scikit-image>=0.24.0" "sparse-dot-mkl" "shapely" "numpy<2.0"
214214

215215
# Install MSC
216-
RUN pip install --no-cache-dir "multi-storage-client[boto3]>=0.14.0"
216+
RUN pip install --no-cache-dir "multi-storage-client[boto3]>=0.33.0"
217217

218218
# cleanup of stage
219219
RUN rm -rf /physicsnemo/

docs/img/crash/roof_crash.gif

-579 KB
Binary file not shown.

examples/multi_storage_client/msc_config.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ profiles:
2525
region_name: us-west-2
2626
base_path: cmip6-pds
2727
signature_version: UNSIGNED
28+
rust_client:
29+
skip_signature: True
2830
cache:
2931
location: /tmp/.cache
3032
size_mb: 5000
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
multi-storage-client[boto3]
1+
multi-storage-client[boto3,fsspec]
2+
zarr

examples/structural_mechanics/crash/README.md

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,6 @@ For an in-depth comparison between the Transolver and MeshGraphNet models and th
2929

3030
</p>
3131

32-
### Roof Crash Modeling
33-
34-
<p align="center">
35-
<img src="../../../docs/img/crash/roof_crash.gif" alt="Roof crash animation" width="80%" />
36-
37-
</p>
38-
3932
## Quickstart
4033

4134
1) Select your recipe (reader, datapipe, model) in `conf/config.yaml`.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
jaxtyping==0.3.3
12
lasso-python==2.0.3
23
torch_geometric==2.6.1
34
torch_scatter>=2.1.2

physicsnemo/active_learning/driver.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@
3535
from torch.nn.parallel import DistributedDataParallel
3636
from torch.utils.data import DataLoader, DistributedSampler
3737

38-
from physicsnemo import Module
3938
from physicsnemo import __version__ as physicsnemo_version
4039
from physicsnemo.active_learning import protocols as p
4140
from physicsnemo.active_learning.config import (
@@ -47,6 +46,7 @@
4746
ActiveLearningLoggerAdapter,
4847
setup_active_learning_logger,
4948
)
49+
from physicsnemo.core import Module
5050
from physicsnemo.distributed import DistributedManager
5151

5252

physicsnemo/active_learning/loop.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@
2626
from torch.utils.data import DataLoader
2727
from tqdm import tqdm
2828

29-
from physicsnemo import Module
3029
from physicsnemo.active_learning import protocols as p
30+
from physicsnemo.core import Module
3131
from physicsnemo.distributed import DistributedManager
32-
from physicsnemo.launch.logging import LaunchLogger
3332
from physicsnemo.utils.capture import StaticCaptureEvaluateNoGrad, StaticCaptureTraining
33+
from physicsnemo.utils.logging import LaunchLogger
3434

3535
__all__ = ["DefaultTrainingLoop"]
3636

0 commit comments

Comments
 (0)