Skip to content

Commit eb5156a

Browse files
authored
Merge branch 'main' into asv-benchmarks-in-ci
2 parents fc26ea3 + 6c2f24b commit eb5156a

27 files changed

Lines changed: 1915 additions & 867 deletions

.github/workflows/blossom-ci.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,8 @@ jobs:
6464
github.actor == 'abokov-nv' ||
6565
github.actor == 'laserkelvin' ||
6666
github.actor == 'mehdiataei' ||
67-
github.actor == 'melo-gonzo'
67+
github.actor == 'melo-gonzo' ||
68+
github.actor == 'negin513'
6869
)
6970
steps:
7071
- name: Check if comment is issued by authorized person

.github/workflows/github-nightly-uv.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -355,10 +355,13 @@ jobs:
355355
- name: Merge coverage reports
356356
run: |
357357
uv run --no-sync coverage combine
358-
uv run --no-sync coverage report --show-missing --omit="*test*" --omit="*internal*" --omit="*experimental*" --fail-under=45
359-
uv run --no-sync coverage html
358+
# -i / --ignore-errors downgrades coverage's fatal "No source for
359+
# code" error to a warning, matching the PR workflow. Kept in
360+
# lockstep with github-pr.yml per .github/CACHE_CONTRACT.md.
361+
uv run --no-sync coverage report -i --show-missing --omit="*test*" --omit="*internal*" --omit="*experimental*" --fail-under=45
362+
uv run --no-sync coverage html -i
360363
# Also create an XML report for potential CI integrations
361-
uv run --no-sync coverage xml -o coverage.xml
364+
uv run --no-sync coverage xml -i -o coverage.xml
362365
363366
- name: Upload coverage HTML report
364367
uses: actions/upload-artifact@v4

.github/workflows/github-pr.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -227,9 +227,13 @@ jobs:
227227
228228
uv run --no-sync coverage combine
229229
230-
uv run --no-sync coverage report --show-missing --omit="*test*" --omit="*internal*" --omit="*experimental*" --fail-under=45
231-
uv run --no-sync coverage html
232-
uv run --no-sync coverage xml -o coverage.xml
230+
# -i / --ignore-errors downgrades coverage's fatal "No source for
231+
# code" error to a warning. The restored nightly baseline can
232+
# reference files this PR has moved or deleted (e.g. a renamed
233+
# module); without -i the combined report aborts on the stale path.
234+
uv run --no-sync coverage report -i --show-missing --omit="*test*" --omit="*internal*" --omit="*experimental*" --fail-under=45
235+
uv run --no-sync coverage html -i
236+
uv run --no-sync coverage xml -i -o coverage.xml
233237
234238
- name: Upload coverage HTML report
235239
uses: actions/upload-artifact@v4

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ pytest-internal:
4444

4545
coverage:
4646
coverage combine && \
47-
coverage report --show-missing --omit=*test* --omit=*internal* --omit=*experimental* --fail-under=60 && \
48-
coverage html
47+
coverage report -i --show-missing --omit=*test* --omit=*internal* --omit=*experimental* --fail-under=60 && \
48+
coverage html -i
4949

5050
all-ci: get-data setup-ci black interrogate lint license install pytest doctest coverage
5151

examples/cfd/darcy_transolver/README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,15 @@ To train Transolver on your own physics problem, modify the `dataloader` in
8989
`train_transolver_darcy.py` to use your own pre-computed data or on-the-fly
9090
solver.
9191

92+
#### Other models
93+
94+
You can also use GeoTransolver, Flare, or GeoTransolver with flare attention
95+
for the darcy example with the "fixed" usage. Change the `model` parameter
96+
to update it! Note that the inputs to geotransolver here uses the positions
97+
and the `x` diffusivity to both the model trunk and encoder paths. For these
98+
problems, GeoTransolver is not yet extensively tested, and your results
99+
may vary.
100+
92101
## Additional Information
93102

94103
More components are added for convenience. `Validators` calculate the loss

examples/cfd/darcy_transolver/config_fix.yaml

Lines changed: 21 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -20,33 +20,31 @@
2020
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2121
# SOFTWARE.
2222

23-
output_dir: ./output/darcy_transolver_fix
24-
run_id: bf16_dev_r85_b8_s64
23+
defaults:
24+
- model: transolver # transolver | flare | geotransolver | geotransolver_fa
25+
- _self_
26+
27+
hydra:
28+
output_subdir: null
29+
run:
30+
dir: .
31+
32+
output_dir: ./output/
33+
run_id: ${hydra:runtime.choices.model}-${optimizer.type}_${precision}_r${resolution}_b${data.batch_size}_s${model.slice_num}
34+
35+
resolution: 85 #421, 211, 141, 106, 85 all viable
2536

2637
data:
27-
train_path: /user_data/datasets/darcy_fix/example_data/piececonst_r421_N1024_smooth1.npz
28-
test_path: /user_data/datasets/darcy_fix/example_data/piececonst_r421_N1024_smooth2.npz
29-
resolution: 85 #421, 211, 141, 106, 85 all viable
30-
batch_size: 8 # This is the GLOBAL batch size
38+
train_path: //lustre/fsw/portfolios/coreai/users/coreya/datasets/darcy_fix/example_data/piececonst_r421_N1024_smooth1.npz
39+
test_path: //lustre/fsw/portfolios/coreai/users/coreya/datasets/darcy_fix/example_data/piececonst_r421_N1024_smooth2.npz
40+
resolution: ${resolution}
41+
batch_size: 64 # This is the GLOBAL batch size
3142

32-
model:
33-
functional_dim: 1
34-
out_dim: 1
35-
embedding_dim: 2
36-
n_layers: 4
37-
n_hidden: 128
38-
dropout: 0.0
39-
n_head: 4
40-
act: gelu
41-
mlp_ratio: 4
42-
unified_pos: False
43-
ref: 8
44-
slice_num: 64
45-
use_te: False
46-
time_input: False
47-
4843
precision: bf16
4944

45+
optimizer:
46+
type: muon # adamw | muon (muon requires PyTorch >= 2.9)
47+
5048
normaliser:
5149
permeability:
5250
mean: 1.25
@@ -69,3 +67,4 @@ training:
6967
validation:
7068
sample_size: 200
7169
validation_pseudo_epochs: 1
70+
save_plots: false
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# SPDX-FileCopyrightText: Copyright (c) 2023 - 2026 NVIDIA CORPORATION & AFFILIATES.
2+
# SPDX-FileCopyrightText: All rights reserved.
3+
# SPDX-License-Identifier: Apache-2.0
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
17+
# FLARE inherits from Transolver and replaces physics attention blocks with
18+
# FLARE (Fast Low-rank Attention Routing Engine) blocks.
19+
# use_te and plus are forced off internally by FLARE.
20+
21+
_target_: physicsnemo.experimental.models.flare.FLARE
22+
_convert_: all
23+
24+
functional_dim: 1
25+
out_dim: 1
26+
embedding_dim: 2
27+
n_layers: 4
28+
n_hidden: 128
29+
dropout: 0.0
30+
n_head: 4
31+
act: gelu
32+
mlp_ratio: 4
33+
slice_num: 64
34+
unified_pos: False
35+
ref: 8
36+
structured_shape:
37+
- ${resolution}
38+
- ${resolution}
39+
time_input: False
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# SPDX-FileCopyrightText: Copyright (c) 2023 - 2026 NVIDIA CORPORATION & AFFILIATES.
2+
# SPDX-FileCopyrightText: All rights reserved.
3+
# SPDX-License-Identifier: Apache-2.0
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
17+
# GeoTransolver with GALE attention (default).
18+
# Uses geometry-aware cross-attention instead of Transolver's structured grid.
19+
20+
_target_: physicsnemo.experimental.models.geotransolver.GeoTransolver
21+
_convert_: all
22+
23+
functional_dim: 3
24+
out_dim: 1
25+
geometry_dim: 3
26+
n_layers: 4
27+
n_hidden: 128
28+
dropout: 0.0
29+
n_head: 4
30+
act: gelu
31+
mlp_ratio: 4
32+
slice_num: 64
33+
use_te: False
34+
time_input: False
35+
attention_type: GALE
36+
include_local_features: False
37+
state_mixing_mode: weighted
38+
structured_shape:
39+
- ${resolution}
40+
- ${resolution}
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# SPDX-FileCopyrightText: Copyright (c) 2023 - 2026 NVIDIA CORPORATION & AFFILIATES.
2+
# SPDX-FileCopyrightText: All rights reserved.
3+
# SPDX-License-Identifier: Apache-2.0
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
17+
# GeoTransolver with GALE_FA (FLARE attention backend).
18+
# Combines FLARE-style global-query self-attention with GALE geometry/context
19+
# cross-attention. use_te must be False for GALE_FA.
20+
21+
_target_: physicsnemo.experimental.models.geotransolver.GeoTransolver
22+
_convert_: all
23+
24+
functional_dim: 3
25+
out_dim: 1
26+
geometry_dim: 3
27+
n_layers: 4
28+
n_hidden: 128
29+
dropout: 0.0
30+
n_head: 4
31+
act: gelu
32+
mlp_ratio: 4
33+
slice_num: 64
34+
use_te: False
35+
time_input: False
36+
attention_type: GALE_FA
37+
include_local_features: False
38+
state_mixing_mode: concat_project
39+
structured_shape:
40+
- ${resolution}
41+
- ${resolution}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# SPDX-FileCopyrightText: Copyright (c) 2023 - 2026 NVIDIA CORPORATION & AFFILIATES.
2+
# SPDX-FileCopyrightText: All rights reserved.
3+
# SPDX-License-Identifier: Apache-2.0
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
17+
_target_: physicsnemo.models.transolver.Transolver
18+
_convert_: all
19+
20+
functional_dim: 1
21+
out_dim: 1
22+
embedding_dim: 2
23+
n_layers: 4
24+
n_hidden: 128
25+
dropout: 0.0
26+
n_head: 4
27+
act: gelu
28+
mlp_ratio: 4
29+
slice_num: 64
30+
unified_pos: False
31+
ref: 8
32+
structured_shape:
33+
- ${resolution}
34+
- ${resolution}
35+
use_te: False
36+
time_input: False

0 commit comments

Comments
 (0)