From 1a7860c1b1e097dcde9a99abc20925b473d39252 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Est=C3=A8ve?= Date: Fri, 9 May 2025 09:09:12 +0200 Subject: [PATCH 1/2] MNT Use PYTHON_GIL=0 only at test time to avoid interference with conda --- azure-pipelines.yml | 1 - build_tools/azure/test_script.sh | 8 ++++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 804214f97808a..a36daf39b50db 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -84,7 +84,6 @@ jobs: ) matrix: pylatest_free_threaded: - PYTHON_GIL: '0' DISTRIB: 'conda-free-threaded' LOCK_FILE: './build_tools/azure/pylatest_free_threaded_linux-64_conda.lock' COVERAGE: 'false' diff --git a/build_tools/azure/test_script.sh b/build_tools/azure/test_script.sh index d8152bd7c3ae2..eb4414283be2b 100755 --- a/build_tools/azure/test_script.sh +++ b/build_tools/azure/test_script.sh @@ -75,6 +75,14 @@ else echo "Could not inspect CPU architecture." fi +if [[ "$DISTRIB" == "conda-free-threaded" ]]; then + # Make sure that GIL is disabled even when importing extensions that have + # not declared free-threaded compatibility. This can be removed when numpy, + # scipy and scikit-learn extensions all have declared free-threaded + # compatibility. + export PYTHON_GIL=0 +fi + TEST_CMD="$TEST_CMD --pyargs sklearn" set -x From 8a0e4ee6ff16af536d8a40ec4b79bfeebb6a2953 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Est=C3=A8ve?= Date: Fri, 9 May 2025 09:26:54 +0200 Subject: [PATCH 2/2] [azure parallel] [free-threaded]