From 6bb9b59758dd5521870c960b9dca2a99762fa2e4 Mon Sep 17 00:00:00 2001 From: Ricardo Vieira Date: Wed, 18 Sep 2024 13:25:35 +0200 Subject: [PATCH 1/4] Do not use deprecated `find_executable` --- pytensor/configdefaults.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pytensor/configdefaults.py b/pytensor/configdefaults.py index 0353c58fcd..a81fd63905 100644 --- a/pytensor/configdefaults.py +++ b/pytensor/configdefaults.py @@ -3,13 +3,13 @@ import os import platform import re +import shutil import socket import sys import textwrap from pathlib import Path import numpy as np -from setuptools._distutils.spawn import find_executable import pytensor from pytensor.configparser import ( @@ -349,7 +349,7 @@ def add_compile_configvars(): # Try to find the full compiler path from the name if param != "": - newp = find_executable(param) + newp = shutil.which(param) if newp is not None: param = newp del newp From fb61863606ef163c17ef840e74f69a956b4d2e51 Mon Sep 17 00:00:00 2001 From: ricardoV94 Date: Wed, 2 Oct 2024 15:21:05 +0200 Subject: [PATCH 2/4] CI:Temporarily pin micromamba version Due to https://github.com/mamba-org/setup-micromamba/issues/225 --- .github/workflows/mypy.yml | 2 +- .github/workflows/test.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/mypy.yml b/.github/workflows/mypy.yml index 7dd4347d53..08da614ce0 100644 --- a/.github/workflows/mypy.yml +++ b/.github/workflows/mypy.yml @@ -15,7 +15,7 @@ jobs: - uses: actions/checkout@v4 - uses: mamba-org/setup-micromamba@v1 with: - micromamba-version: "latest" # any version from https://github.com/mamba-org/micromamba-releases + micromamba-version: "1.5.10-0" # until https://github.com/mamba-org/setup-micromamba/issues/225 is resolved environment-file: environment.yml init-shell: bash cache-environment: true diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 674bc52c7b..fb11c8b556 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -135,7 +135,7 @@ jobs: uses: mamba-org/setup-micromamba@v1 with: environment-name: pytensor-test - micromamba-version: "latest" + micromamba-version: "1.5.10-0" # until https://github.com/mamba-org/setup-micromamba/issues/225 is resolved init-shell: bash post-cleanup: "all" create-args: python=${{ matrix.python-version }} @@ -209,7 +209,7 @@ jobs: uses: mamba-org/setup-micromamba@v1 with: environment-name: pytensor-test - micromamba-version: "latest" + micromamba-version: "1.5.10-0" # until https://github.com/mamba-org/setup-micromamba/issues/225 is resolved init-shell: bash post-cleanup: "all" - name: Install dependencies From 31418e6189f54d3c0b55f35f63b53f05b37a735a Mon Sep 17 00:00:00 2001 From: ricardoV94 Date: Wed, 2 Oct 2024 15:31:36 +0200 Subject: [PATCH 3/4] CI: Torch not used in benchmark --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index fb11c8b556..741037476d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -215,7 +215,7 @@ jobs: - name: Install dependencies shell: micromamba-shell {0} run: | - micromamba install --yes -q -c conda-forge "python~=${PYTHON_VERSION}=*_cpython" mkl numpy scipy pip mkl-service cython pytest "numba>=0.57" jax jaxlib pytest-benchmark pytorch pytorch-cuda=12.1 -c pytorch -c nvidia + micromamba install --yes -q -c conda-forge "python~=${PYTHON_VERSION}=*_cpython" mkl numpy scipy pip mkl-service cython pytest "numba>=0.57" jax jaxlib pytest-benchmark pip install -e ./ micromamba list && pip freeze python -c 'import pytensor; print(pytensor.config.__str__(print_doc=False))' From a9ed0f910b34721ff17318ef4bf4389d708e96cc Mon Sep 17 00:00:00 2001 From: ricardoV94 Date: Wed, 2 Oct 2024 15:32:45 +0200 Subject: [PATCH 4/4] CI: Torch not compatible with recent mkl https://github.com/pytorch/pytorch/issues/123097 --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 741037476d..e3d2adf461 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -157,7 +157,7 @@ jobs: micromamba install --yes -q "python~=${PYTHON_VERSION}=*_cpython" mkl numpy scipy pip mkl-service graphviz cython pytest coverage pytest-cov pytest-benchmark pytest-mock if [[ $INSTALL_NUMBA == "1" ]]; then micromamba install --yes -q -c conda-forge "python~=${PYTHON_VERSION}=*_cpython" "numba>=0.57"; fi if [[ $INSTALL_JAX == "1" ]]; then micromamba install --yes -q -c conda-forge "python~=${PYTHON_VERSION}=*_cpython" jax jaxlib numpyro && pip install tensorflow-probability; fi - if [[ $INSTALL_TORCH == "1" ]]; then micromamba install --yes -q -c conda-forge "python~=${PYTHON_VERSION}=*_cpython" pytorch pytorch-cuda=12.1 -c pytorch -c nvidia; fi + if [[ $INSTALL_TORCH == "1" ]]; then micromamba install --yes -q -c conda-forge "python~=${PYTHON_VERSION}=*_cpython" pytorch pytorch-cuda=12.1 "mkl<=2024.0" -c pytorch -c nvidia; fi pip install pytest-sphinx pip install -e ./