Skip to content

Commit d42159f

Browse files
MilesCranmerMilesCranmerBot
authored andcommitted
Merge pull request MilesCranmer#1112 from MilesCranmer/fix-ci
ci: fix upper bound python for jax compat
1 parent c64ab94 commit d42159f

2 files changed

Lines changed: 30 additions & 2 deletions

File tree

.github/workflows/CI.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,34 @@ jobs:
206206
- name: "Run tests"
207207
run: python -m pysr test main,jax,torch
208208

209+
autodiff_backends:
210+
name: Test autodiff backends
211+
runs-on: ubuntu-latest
212+
defaults:
213+
run:
214+
shell: bash -l {0}
215+
strategy:
216+
matrix:
217+
python-version: ['3.13']
218+
julia-version: ['1']
219+
220+
steps:
221+
- uses: actions/checkout@v5
222+
- name: "Set up Julia"
223+
uses: julia-actions/setup-julia@v2
224+
with:
225+
version: ${{ matrix.julia-version }}
226+
- name: "Set up Python"
227+
uses: actions/setup-python@v6
228+
with:
229+
python-version: ${{ matrix.python-version }}
230+
cache: pip
231+
- name: "Install PySR and all dependencies"
232+
run: |
233+
python -m pip install --upgrade pip
234+
pip install '.[dev]'
235+
- name: "Run autodiff backend tests"
236+
run: python -m pysr test autodiff
209237
wheel_test:
210238
name: Test from wheel
211239
runs-on: ubuntu-latest

pysr/export.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,8 @@ def add_export_formats(
8383
)
8484

8585
if output_jax_format:
86-
exports["jax_format"] = jax_format
86+
exports["jax_format"] = pd.Series(jax_format, index=output.index)
8787
if output_torch_format:
88-
exports["torch_format"] = torch_format
88+
exports["torch_format"] = pd.Series(torch_format, index=output.index)
8989

9090
return exports

0 commit comments

Comments
 (0)