From a25c3e697c6b30c070e776476cea198290c51419 Mon Sep 17 00:00:00 2001 From: kratman Date: Wed, 16 Oct 2024 15:24:01 -0400 Subject: [PATCH 1/6] Removing the macos-12 runner --- .github/workflows/publish_pypi.yml | 2 +- .github/workflows/run_periodic_tests.yml | 4 ++-- .github/workflows/test_on_push.yml | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/publish_pypi.yml b/.github/workflows/publish_pypi.yml index 64c8a3a777..89c9b057c1 100644 --- a/.github/workflows/publish_pypi.yml +++ b/.github/workflows/publish_pypi.yml @@ -242,7 +242,7 @@ jobs: python scripts/install_KLU_Sundials.py python -m cibuildwheel --output-dir wheelhouse env: - # 10.13 for Intel (macos-12/macos-13), 11.0 for Apple Silicon (macos-14 and macos-latest) + # 10.13 for Intel (macos-13), 11.0 for Apple Silicon (macos-14 and macos-latest) MACOSX_DEPLOYMENT_TARGET: ${{ matrix.os == 'macos-14' && '11.0' || '10.13' }} CIBW_ARCHS_MACOS: auto CIBW_BEFORE_BUILD: python -m pip install cmake casadi setuptools wheel delocate diff --git a/.github/workflows/run_periodic_tests.yml b/.github/workflows/run_periodic_tests.yml index 68a8a1ae8b..6e86de054e 100644 --- a/.github/workflows/run_periodic_tests.yml +++ b/.github/workflows/run_periodic_tests.yml @@ -31,7 +31,7 @@ jobs: strategy: fail-fast: false matrix: - os: [ ubuntu-latest, macos-12, macos-14, windows-latest ] + os: [ ubuntu-latest, macos-13, macos-14, windows-latest ] python-version: [ "3.9", "3.10", "3.11", "3.12" ] name: Tests (${{ matrix.os }} / Python ${{ matrix.python-version }}) @@ -46,7 +46,7 @@ jobs: sudo apt-get install gfortran gcc graphviz pandoc libopenblas-dev texlive-latex-extra dvipng - name: Install macOS system dependencies - if: matrix.os == 'macos-12' || matrix.os == 'macos-14' + if: matrix.os == 'macos-13' || matrix.os == 'macos-14' env: HOMEBREW_NO_INSTALL_CLEANUP: 1 HOMEBREW_NO_AUTO_UPDATE: 1 diff --git a/.github/workflows/test_on_push.yml b/.github/workflows/test_on_push.yml index 9be0c7b3ea..32e3017446 100644 --- a/.github/workflows/test_on_push.yml +++ b/.github/workflows/test_on_push.yml @@ -41,7 +41,7 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-latest, macos-12, macos-14, windows-latest] + os: [ubuntu-latest, macos-13, macos-14, windows-latest] python-version: ["3.9", "3.10", "3.11", "3.12"] name: Tests (${{ matrix.os }} / Python ${{ matrix.python-version }}) @@ -65,7 +65,7 @@ jobs: sudo apt-get install libopenblas-dev texlive-latex-extra dvipng - name: Install macOS system dependencies - if: matrix.os == 'macos-12' || matrix.os == 'macos-14' + if: matrix.os == 'macos-13' || matrix.os == 'macos-14' env: HOMEBREW_NO_INSTALL_CLEANUP: 1 HOMEBREW_NO_AUTO_UPDATE: 1 From d163950720540741a2509c8016f0e575b69c4353 Mon Sep 17 00:00:00 2001 From: kratman Date: Wed, 16 Oct 2024 20:07:27 -0400 Subject: [PATCH 2/6] Update to latest IREE stable release --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 1db7c927a3..7612b6a6f3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -126,7 +126,7 @@ jax = [ # For MLIR expression evaluation (IDAKLU Solver) iree = [ # must be pip installed with --find-links=https://iree.dev/pip-release-links.html - "iree-compiler==20240507.886", # see IREE compatibility notes in noxfile.py + "iree-compiler==20240828.999", # see IREE compatibility notes in noxfile.py ] # Contains all optional dependencies, except for jax, iree, and dev dependencies all = [ From 12aae9e73567b6b404df6177c77f6365c1cf0bf3 Mon Sep 17 00:00:00 2001 From: kratman Date: Wed, 16 Oct 2024 20:23:57 -0400 Subject: [PATCH 3/6] Try a different stable release --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 7612b6a6f3..dce417980e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -126,7 +126,7 @@ jax = [ # For MLIR expression evaluation (IDAKLU Solver) iree = [ # must be pip installed with --find-links=https://iree.dev/pip-release-links.html - "iree-compiler==20240828.999", # see IREE compatibility notes in noxfile.py + "iree-compiler==20240621.931", # see IREE compatibility notes in noxfile.py ] # Contains all optional dependencies, except for jax, iree, and dev dependencies all = [ From 71cffaef006342be1a4a9d2da12fb9c70921bf63 Mon Sep 17 00:00:00 2001 From: kratman Date: Wed, 16 Oct 2024 20:51:22 -0400 Subject: [PATCH 4/6] Change jax version --- pyproject.toml | 4 ++-- src/pybamm/util.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index dce417980e..23c0f4da20 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -120,8 +120,8 @@ dev = [ # Note: These must be kept in sync with the versions defined in pybamm/util.py, and # must remain compatible with IREE (see noxfile.py for IREE compatibility). jax = [ - "jax==0.4.27", - "jaxlib==0.4.27", + "jax==0.4.29", + "jaxlib==0.4.29", ] # For MLIR expression evaluation (IDAKLU Solver) iree = [ diff --git a/src/pybamm/util.py b/src/pybamm/util.py index 527c55f526..cca4988a0e 100644 --- a/src/pybamm/util.py +++ b/src/pybamm/util.py @@ -19,8 +19,8 @@ # Versions of jax and jaxlib compatible with PyBaMM. Note: these are also defined in # the extras dependencies in pyproject.toml, and therefore must be kept in sync. -JAX_VERSION = "0.4.27" -JAXLIB_VERSION = "0.4.27" +JAX_VERSION = "0.4.29" +JAXLIB_VERSION = "0.4.29" def root_dir(): From 2a102f1443c5586c744001e6f8d870ec328eea9f Mon Sep 17 00:00:00 2001 From: kratman Date: Wed, 16 Oct 2024 21:07:09 -0400 Subject: [PATCH 5/6] last attempt before reverting jax-iree changes --- noxfile.py | 2 +- pyproject.toml | 4 ++-- src/pybamm/util.py | 10 ++-------- 3 files changed, 5 insertions(+), 11 deletions(-) diff --git a/noxfile.py b/noxfile.py index 14bafcca47..fdcd461068 100644 --- a/noxfile.py +++ b/noxfile.py @@ -113,7 +113,7 @@ def run_pybamm_requires(session): "--depth=1", "--recurse-submodules", "--shallow-submodules", - "--branch=candidate-20240507.886", + "--branch=candidate-20240621.931", "https://github.com/openxla/iree", "iree/", external=True, diff --git a/pyproject.toml b/pyproject.toml index 23c0f4da20..f93dbf9680 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -120,8 +120,8 @@ dev = [ # Note: These must be kept in sync with the versions defined in pybamm/util.py, and # must remain compatible with IREE (see noxfile.py for IREE compatibility). jax = [ - "jax==0.4.29", - "jaxlib==0.4.29", + "jax==0.4.31", + "jaxlib==0.4.31", ] # For MLIR expression evaluation (IDAKLU Solver) iree = [ diff --git a/src/pybamm/util.py b/src/pybamm/util.py index cca4988a0e..5a1dbc3059 100644 --- a/src/pybamm/util.py +++ b/src/pybamm/util.py @@ -1,9 +1,3 @@ -# -# Utility classes for PyBaMM -# -# The code in this file is adapted from Pints -# (see https://github.com/pints-team/pints) -# import importlib.util import importlib.metadata import numbers @@ -19,8 +13,8 @@ # Versions of jax and jaxlib compatible with PyBaMM. Note: these are also defined in # the extras dependencies in pyproject.toml, and therefore must be kept in sync. -JAX_VERSION = "0.4.29" -JAXLIB_VERSION = "0.4.29" +JAX_VERSION = "0.4.31" +JAXLIB_VERSION = "0.4.31" def root_dir(): From 717dd7cb48615d0f645933bc77c26b049fe22363 Mon Sep 17 00:00:00 2001 From: kratman Date: Wed, 16 Oct 2024 21:25:30 -0400 Subject: [PATCH 6/6] Hack to make keep this running --- noxfile.py | 4 ++-- pyproject.toml | 6 +++--- src/pybamm/util.py | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/noxfile.py b/noxfile.py index fdcd461068..4792cd90c2 100644 --- a/noxfile.py +++ b/noxfile.py @@ -40,7 +40,7 @@ def set_iree_state(): # iree-compiler is currently only available as a wheel on macOS 13 (or # higher) and Python version 3.11 mac_ver = int(platform.mac_ver()[0].split(".")[0]) - if (not sys.version_info[:2] == (3, 11)) or mac_ver < 13: + if (not sys.version_info[:2] == (3, 11)) or mac_ver < 14: warnings.warn( ( "IREE is only supported on MacOS 13 (or higher) and Python" @@ -113,7 +113,7 @@ def run_pybamm_requires(session): "--depth=1", "--recurse-submodules", "--shallow-submodules", - "--branch=candidate-20240621.931", + "--branch=candidate-20240507.886", "https://github.com/openxla/iree", "iree/", external=True, diff --git a/pyproject.toml b/pyproject.toml index f93dbf9680..1db7c927a3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -120,13 +120,13 @@ dev = [ # Note: These must be kept in sync with the versions defined in pybamm/util.py, and # must remain compatible with IREE (see noxfile.py for IREE compatibility). jax = [ - "jax==0.4.31", - "jaxlib==0.4.31", + "jax==0.4.27", + "jaxlib==0.4.27", ] # For MLIR expression evaluation (IDAKLU Solver) iree = [ # must be pip installed with --find-links=https://iree.dev/pip-release-links.html - "iree-compiler==20240621.931", # see IREE compatibility notes in noxfile.py + "iree-compiler==20240507.886", # see IREE compatibility notes in noxfile.py ] # Contains all optional dependencies, except for jax, iree, and dev dependencies all = [ diff --git a/src/pybamm/util.py b/src/pybamm/util.py index 5a1dbc3059..5b10b23fcb 100644 --- a/src/pybamm/util.py +++ b/src/pybamm/util.py @@ -13,8 +13,8 @@ # Versions of jax and jaxlib compatible with PyBaMM. Note: these are also defined in # the extras dependencies in pyproject.toml, and therefore must be kept in sync. -JAX_VERSION = "0.4.31" -JAXLIB_VERSION = "0.4.31" +JAX_VERSION = "0.4.27" +JAXLIB_VERSION = "0.4.27" def root_dir():