Skip to content

Commit c0705f5

Browse files
Merge branch 'main' into dependabot/pip/setuptools-lt-84.0.0
2 parents 2433679 + 4ddffa3 commit c0705f5

70 files changed

Lines changed: 3661 additions & 378 deletions

File tree

Some content is hidden

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

.github/workflows/integration-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
strategy:
1313
max-parallel: 10
1414
matrix:
15-
python_version: ['3.10', '3.12']
15+
python_version: ['3.11', '3.14']
1616

1717
steps:
1818
- uses: actions/checkout@v7

.github/workflows/stale.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
issues: write
1111
pull-requests: write
1212
steps:
13-
- uses: actions/stale@v10.4.0
13+
- uses: actions/stale@v11.0.0
1414
with:
1515
days-before-stale: 30
1616
days-before-close: 14

.github/workflows/test.yml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
# Without it, GitHub auto-expands EVERY field of the object-typed
3333
# `shard` matrix entry — including `shard.paths` — into a
3434
# >100-character truncated string like
35-
# `test (3.13, core, tests/core/models tests/core/graph ...`.
35+
# `test (3.14, core, tests/core/models tests/core/graph ...`.
3636
# That diverges from the short custom status emitted by
3737
# multi-trigger-setup, forcing branch protection to pick one event
3838
# type's names and break the others.
@@ -54,7 +54,7 @@ jobs:
5454
max-parallel: 10
5555
fail-fast: false
5656
matrix:
57-
python_version: ['3.11', '3.13']
57+
python_version: ['3.11', '3.14']
5858
# tests/perf is run by perf-test.yml on a separate cadence.
5959
# tests/applications and tests/lammps are run by integration-test.yml
6060
# and test_lammps_gpu respectively. Both shards below intentionally
@@ -112,7 +112,7 @@ jobs:
112112
-r tests/requirements.txt # pin test packages
113113
114114
- name: Install torchsim (Python 3.12+)
115-
if: ${{ matrix.python_version == '3.12' || matrix.python_version == '3.13' }}
115+
if: ${{ matrix.python_version == '3.12' || matrix.python_version == '3.13' || matrix.python_version == '3.14' }}
116116
run: |
117117
pip install packages/fairchem-core[torchsim]
118118
@@ -145,7 +145,7 @@ jobs:
145145
run: |
146146
pytest -m "serial and not gpu" ${{ matrix.shard.paths }} -vv --ignore=tests/demo/ocpapi/tests/integration/ --exclude-models=uma-s-1p1,uma-s-1p2 --cov-report=xml --cov=fairchem --cov-append --junitxml=junit-serial-${{ matrix.shard.name }}.xml -o junit_family=legacy -c ./packages/fairchem-core/pyproject.toml --suppress-no-test-exit-code
147147
148-
- if: ${{ matrix.python_version == '3.13' }}
148+
- if: ${{ matrix.python_version == '3.14' }}
149149
name: codecov-coverage
150150
uses: codecov/codecov-action@v7
151151
with:
@@ -154,7 +154,7 @@ jobs:
154154
token: ${{ secrets.CODECOV_TOKEN }}
155155
verbose: true
156156

157-
- if: ${{ matrix.python_version == '3.13' }}
157+
- if: ${{ matrix.python_version == '3.14' }}
158158
name: codecov-test-results
159159
uses: codecov/test-results-action@v1
160160
with:
@@ -180,7 +180,7 @@ jobs:
180180
strategy:
181181
fail-fast: false
182182
matrix:
183-
python_version: ['3.13']
183+
python_version: ['3.14']
184184
sweep_model: [uma-s-1p1, uma-s-1p2]
185185
shard: *cpu_shards
186186

@@ -225,7 +225,7 @@ jobs:
225225
-r tests/requirements.txt # pin test packages
226226
227227
- name: Install torchsim (Python 3.12+)
228-
if: ${{ matrix.python_version == '3.12' || matrix.python_version == '3.13' }}
228+
if: ${{ matrix.python_version == '3.12' || matrix.python_version == '3.13' || matrix.python_version == '3.14' }}
229229
run: |
230230
pip install packages/fairchem-core[torchsim]
231231
@@ -285,7 +285,7 @@ jobs:
285285
strategy:
286286
fail-fast: false
287287
matrix:
288-
python_version: ['3.13']
288+
python_version: ['3.14']
289289
# YAML anchor: shard list is reused by test_gpu_sweep below.
290290
# Do not reorder jobs (the alias must follow the anchor textually).
291291
shard: &gpu_shards
@@ -327,7 +327,7 @@ jobs:
327327
-r tests/requirements.txt # pin test packages
328328
329329
- name: Install torchsim (Python 3.12+)
330-
if: ${{ matrix.python_version == '3.12' || matrix.python_version == '3.13' }}
330+
if: ${{ matrix.python_version == '3.12' || matrix.python_version == '3.13' || matrix.python_version == '3.14' }}
331331
run: |
332332
pip install packages/fairchem-core[torchsim]
333333
@@ -375,7 +375,7 @@ jobs:
375375
strategy:
376376
fail-fast: false
377377
matrix:
378-
python_version: ['3.13']
378+
python_version: ['3.14']
379379
sweep_model: [uma-s-1p1, uma-s-1p2]
380380
shard: *gpu_shards
381381

@@ -408,7 +408,7 @@ jobs:
408408
-r tests/requirements.txt # pin test packages
409409
410410
- name: Install torchsim (Python 3.12+)
411-
if: ${{ matrix.python_version == '3.12' || matrix.python_version == '3.13' }}
411+
if: ${{ matrix.python_version == '3.12' || matrix.python_version == '3.13' || matrix.python_version == '3.14' }}
412412
run: |
413413
pip install packages/fairchem-core[torchsim]
414414
@@ -450,15 +450,15 @@ jobs:
450450
strategy:
451451
max-parallel: 1
452452
matrix:
453-
python_version: ['3.13']
453+
python_version: ['3.14']
454454

455455
steps:
456456
- uses: actions/checkout@v7
457457
- uses: mamba-org/setup-micromamba@v3
458458
with:
459459
generate-run-shell: true # This is the default behavior
460460
environment-name: test_env # Specifies a new environment to be created
461-
create-args: python=3.13 # Specifies packages to install into the new environment
461+
create-args: python=3.14 # Specifies packages to install into the new environment
462462

463463
- name: Checkout code
464464
uses: actions/checkout@v7

CLAUDE.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,53 @@ configs/ # Hydra YAML configs (datasets, tasks, backbone, optimi
242242
- `lmdb` - Dataset storage format
243243
- `ray[serve]>=2.53.0` - Distributed computing
244244
245+
## Testing Gotchas
246+
247+
- Tests that download registered checkpoints must declare their models with a
248+
`pretrained` marker. This lets base CI deselect them with `--exclude-models`
249+
and routes them to the matching model-sweep job.
250+
- Freeze inference parameters after inference-specific module replacement.
251+
Main's folded-batch linear path removes the former general-backend regression:
252+
on one H100, freezing improved compiled general inference by 15-17% and cut
253+
peak allocated memory by 27-29% at 100-2,000 atoms. PyTorch 2.13 CPU checks
254+
improved by 4% at 32 atoms and were neutral at 1,000 atoms. Custom backward
255+
paths must preserve input derivatives independently of parameter gradients.
256+
- `umas_fast_gpu` custom backward operators do not implement `vmap` batching.
257+
Compute Hessians through the per-component loop (`hessian_vmap=False`) when
258+
exercising that backend, and ensure inference settings forward that option
259+
into the backbone configuration.
260+
- Set `CI=true` when reproducing CPU CI shards locally. Some multi-GPU graph
261+
parallel tests rely on that environment variable for skipping instead of the
262+
`gpu` marker, so the CI marker expression alone will still collect them.
263+
- `graph_parallel_group_size=None` disables graph-parallel setup. A value of
264+
`1` intentionally initializes singleton graph- and data-parallel groups and
265+
is used to exercise those paths in tests; do not treat it as disabled.
266+
- Keep the full `AtomicData.clone()` boundary in prediction unless benchmarks
267+
justify changing it and every model-side mutation has been audited. Graph
268+
parallelism, MOLE preparation, and conservative gradients can replace or
269+
mutate input fields, so a selective shallow copy is brittle.
270+
271+
## Numerical Precision
272+
273+
- Model constructors must not mutate process-wide PyTorch precision settings
274+
such as `torch.set_float32_matmul_precision`. Precision is caller-owned;
275+
inference applies TF32 temporarily through `InferenceSettings.tf32` and
276+
restores the prior settings afterward.
277+
- TF32 policy belongs to the training/evaluation unit config or
278+
`InferenceSettings.tf32`, never to a model config or model attribute.
279+
Execution callers scope and restore the policy outside compiled `forward`
280+
methods because precision getters cannot be traced by fullgraph.
281+
- Training and evaluation units default TF32 to disabled. Configs should set
282+
`tf32` only when overriding that default. Hydra CLI overrides for configs
283+
that omit the key must use the add syntax, such as
284+
`+runner.train_eval_unit.tf32=true`.
285+
- Keep one configurable TF32 context manager for scoped matmul precision and
286+
cuDNN state instead of introducing overlapping context managers.
287+
- Use the `tf32_context_manager` name for that policy; it controls both matmul
288+
precision and cuDNN TF32, so `matmul_context` is too narrow.
289+
- Training FLOPs profiling invokes the model from `on_train_start`; scoped
290+
execution settings must cover profiling as well as train/eval step methods.
291+
245292
## Cluster Validation Gotchas
246293
247294
- H100 compute nodes do not have PyPI egress. Provision Python environments on

configs/allscaip/omol_4m.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ runner:
106106
eval_dataloader: ${eval_dataloader}
107107
train_eval_unit:
108108
_target_: fairchem.core.units.mlip_unit.mlip_unit.MLIPTrainEvalUnit
109+
tf32: True
109110
job_config: ${job}
110111
tasks: ${tasks}
111112
model:

configs/allscaip/omol_4m_ft.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ runner:
111111
eval_dataloader: ${eval_dataloader}
112112
train_eval_unit:
113113
_target_: fairchem.core.units.mlip_unit.mlip_unit.MLIPTrainEvalUnit
114+
tf32: True
114115
job_config: ${job}
115116
tasks: ${tasks}
116117
model:

configs/allscaip/omol_all.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ runner:
106106
eval_dataloader: ${eval_dataloader}
107107
train_eval_unit:
108108
_target_: fairchem.core.units.mlip_unit.mlip_unit.MLIPTrainEvalUnit
109+
tf32: True
109110
job_config: ${job}
110111
tasks: ${tasks}
111112
model:

configs/allscaip/omol_all_ft.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ runner:
111111
eval_dataloader: ${eval_dataloader}
112112
train_eval_unit:
113113
_target_: fairchem.core.units.mlip_unit.mlip_unit.MLIPTrainEvalUnit
114+
tf32: True
114115
job_config: ${job}
115116
tasks: ${tasks}
116117
model:

configs/escaip/training/mptrj_direct_escaip_fair.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ runner:
114114
eval_dataloader: ${eval_dataloader}
115115
train_eval_unit:
116116
_target_: fairchem.core.units.mlip_unit.mlip_unit.MLIPTrainEvalUnit
117+
tf32: True
117118
job_config: ${job}
118119
tasks: ${tasks}
119120
model:

configs/escaip/training/mptrj_finetune_escaip_fair.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ runner:
115115
eval_dataloader: ${eval_dataloader}
116116
train_eval_unit:
117117
_target_: fairchem.core.units.mlip_unit.mlip_unit.MLIPTrainEvalUnit
118+
tf32: True
118119
job_config: ${job}
119120
tasks: ${tasks}
120121
model:

0 commit comments

Comments
 (0)