Skip to content

Commit 08fb957

Browse files
Update max Python to 3.14 (#2114)
Also updates `integration-test.yml` to run on the mix and max supported Python versions --------- Co-authored-by: Luis Barroso-Luque <lbluque@users.noreply.github.com>
1 parent 075fd27 commit 08fb957

5 files changed

Lines changed: 20 additions & 17 deletions

File tree

.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/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

packages/fairchem-core/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ name = "fairchem-core"
77
description = "Machine learning models for chemistry and materials science by the FAIR Chemistry team"
88
license = {text = "MIT License"}
99
dynamic = ["version", "readme"]
10-
requires-python = ">=3.11, <3.14"
10+
requires-python = ">=3.11, <3.15"
1111
dependencies = [
1212
"torch~=2.13.0",
1313
"ray[serve]>=2.53.0",

packages/fairchem-lammps/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ name = "fairchem-lammps"
77
description = "Fairchem extension package to use LAMMPs with fairchem models"
88
license = {text = "GnuV2 License"}
99
dynamic = ["version", "readme"]
10-
requires-python = ">=3.10,<3.14"
10+
requires-python = ">=3.10,<3.15"
1111
dependencies = [
1212
"fairchem.core>=2.4.0",
1313
]

src/fairchem/core/scripts/create_finetune_dataset.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,10 @@ def compute_normalizer_and_linear_reference(train_path, num_workers):
3535
dataset = AseDBDataset({"src": str(train_path)})
3636

3737
sample_indices = random.sample(range(len(dataset)), min(100000, len(dataset)))
38-
with mp.Pool(num_workers) as pool:
38+
# Python 3.14 changed the POSIX default start method from ``fork`` to
39+
# ``forkserver``. These workers rely on inheriting the dataset initialized
40+
# above, so keep using ``fork`` explicitly.
41+
with mp.get_context("fork").Pool(num_workers) as pool:
3942
outputs = list(
4043
tqdm(
4144
pool.imap(extract_energy_and_forces, sample_indices),

0 commit comments

Comments
 (0)