10000 fix: python 3.12 test CI (#950) · zama-ai/concrete-ml@96a94c4 · GitHub
[go: up one dir, main page]

Skip to content

Commit 96a94c4

Browse files
fix: python 3.12 test CI (#950)
1 parent 0edf038 commit 96a94c4

File tree

9 files changed

+40
-20
lines changed

9 files changed

+40
-20
lines changed

.github/workflows/continuous-integration.yaml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ on:
3333
default: "3.8"
3434

3535
manual_call:
36-
description: "Do not uncheck this"
36+
description: "Do not uncheck this!"
3737
type: boolean
3838
required: false
3939
default: true
@@ -99,7 +99,7 @@ env:
9999
jobs:
100100
commit-checks:
101101
name: Commit Checks
102-
runs-on: ubu 10BC0 ntu-20.04
102+
runs-on: ubuntu-24.04
103103
outputs:
104104
commits_ok: ${{ steps.commit-conformance.outcome == 'success' }}
105105
steps:
@@ -156,7 +156,7 @@ jobs:
156156
needs: [commit-checks]
157157
# We skip the CI in cases of pushing to internal main (because all pushes to main internal are now from the bot)
158158
if: ${{ !( github.repository != 'zama-ai/concrete-ml' && github.event_name == 'push' && github.ref == 'refs/heads/main' ) }}
159-
runs-on: ubuntu-20.04
159+
runs-on: ubuntu-24.04
160160
timeout-minutes: 5
161161
outputs:
162162
linux-matrix: ${{ steps.set-matrix.outputs.linux-matrix }}
@@ -295,7 +295,7 @@ jobs:
295295
start-runner-linux:
296296
needs: [commit-checks, matrix-preparation]
297297
name: Start EC2 runner (Linux)
298-
runs-on: ubuntu-20.04
298+
runs-on: ubuntu-24.04
299299
timeout-minutes: 15
300300
outputs:
301301
label-38: ${{ steps.start-ec2-runner-38.outputs.label }}
@@ -1025,7 +1025,7 @@ jobs:
10251025
linux-build-status:
10261026
name: Build Status (Linux)
10271027
needs: [build-linux]
1028-
runs-on: ubuntu-20.04
1028+
runs-on: ubuntu-24.04
10291029
timeout-minutes: 2
10301030
if: success() || failure()
10311031
steps:
@@ -1045,7 +1045,7 @@ jobs:
10451045
stop-runner-linux:
10461046
name: Stop EC2 runner (Linux)
10471047
needs: [build-linux, start-runner-linux]
1048-
runs-on: ubuntu-20.04
1048+
runs-on: ubuntu-24.04
10491049
timeout-minutes: 2
10501050
if: ${{ always() && (needs.start-runner-linux.result != 'skipped') }}
10511051
steps:
@@ -1186,7 +1186,7 @@ jobs:
11861186
11871187
decide-slack-report:
11881188
name: Decide Slack report
1189-
runs-on: ubuntu-20.04
1189+
runs-on: ubuntu-24.04
11901190
outputs:
11911191
send_slack_report: ${{ steps.set-decision.outputs.send_slack_report }}
11921192
steps:
@@ -1211,7 +1211,7 @@ jobs:
12111211
# if the job should be run or not in an previous job and store it in its output
12121212
slack-report:
12131213
name: Slack report
1214-
runs-on: ubuntu-20.04
1214+
runs-on: ubuntu-24.04
12151215
if: |
12161216
always()
12171217
&& needs.matrix-preparation.result != 'skipped'
@@ -1310,7 +1310,7 @@ jobs:
13101310

13111311
stop-ec2-failure-slack-alert:
13121312
name: Stop EC2 failure Slack alert
1313-
runs-on: ubuntu-20.04
1313+
runs-on: ubuntu-24.04
13141314
if: |
13151315
always()
13161316
&& needs.matrix-preparation.result != 'skipped'

.github/workflows/prepare_release.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ jobs:
6161
- name: Install dependencies
6262
run: |
6363
python -m pip install --upgrade pip
64-
python -m pip install poetry==1.7.1
64+
python -m pip install poetry==1.8.4
6565
make setup_env
6666
6767
# Make sure that the workflow has been triggered from a release branch if this is a patch

.github/workflows/update_licenses.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ jobs:
8585
- name: Install dependencies
8686
run: |
8787
python -m pip install --upgrade pip
88-
python -m pip install poetry==1.7.1
88+
python -m pip install poetry==1.8.4
8989
make setup_env
9090
9191
- name: Update licenses

.github/workflows/weekly-pip-audit.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ jobs:
6161
which pip3
6262
6363
python -m pip install --upgrade pip
64-
python -m pip install poetry==1.7.1
64+
python -m pip install poetry==1.8.4
6565
make setup_env
6666
6767
- name: Run pip-audit

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ CONCRETE_PACKAGE_PATH=$(SRC_DIR)/concrete
1919
COUNT?=1
2020
RANDOMLY_SEED?=$$RANDOM
2121
PYTEST_OPTIONS:=
22-
POETRY_VERSION:=1.7.1
22+
POETRY_VERSION:=1.8.4
2323
APIDOCS_OUTPUT?="./docs/references/api"
2424
OPEN_PR="true"
2525

script/make_utils/setup_os_deps.sh

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,25 @@ linux_install_github_cli () {
8989
${SUDO_BIN:+$SUDO_BIN} dpkg -i /home/dev_user/gh_${GH_CLI_VERSION}_linux_amd64.deb
9090
}
9191

92+
linux_install_cmake () {
93+
${SUDO_BIN:+$SUDO_BIN} apt-get update
94+
${SUDO_BIN:+$SUDO_BIN} apt-get -y install ca-certificates gpg wget
95+
test -f /usr/share/doc/kitware-archive-keyring/copyright ||
96+
wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | \
97+
gpg --dearmor - | \
98+
${SUDO_BIN:+$SUDO_BIN} tee /usr/share/keyrings/kitware-archive-keyring.gpg >/dev/null
99+
echo 'deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ focal main' | \
100+
${SUDO_BIN:+$SUDO_BIN} tee /etc/apt/sources.list.d/kitware.list >/dev/null
101+
${SUDO_BIN:+$SUDO_BIN} apt-get update
102+
test -f /usr/share/doc/kitware-archive-keyring/copyright || \
103+
${SUDO_BIN:+$SUDO_BIN} rm /usr/share/keyrings/kitware-archive-keyring.gpg
104+
${SUDO_BIN:+$SUDO_BIN} apt-get install -y kitware-archive-keyring
105+
echo 'deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ focal-rc main' | \
106+
${SUDO_BIN:+$SUDO_BIN} tee -a /etc/apt/sources.list.d/kitware.list >/dev/null
107+
${SUDO_BIN:+$SUDO_BIN} apt-get update
108+
${SUDO_BIN:+$SUDO_BIN} apt-get -y install cmake
109+
}
110+
92111
OS_NAME=$(uname)
93112

94113
if [[ "${OS_NAME}" == "Linux" ]]; then
@@ -126,26 +145,28 @@ if [[ "${OS_NAME}" == "Linux" ]]; then
126145
jq \
127146
make \
128147
rsync \
129-
cmake \
130148
unzip \
131149
pandoc \
132150
openssl \
133151
shellcheck \
152+
libssl-dev \
134153
texlive-latex-base texlive-latex-extra texlive-fonts-recommended texlive-xetex lmodern \
135154
wget pipx &&
136155
${CLEAR_APT_LISTS:+$CLEAR_APT_LISTS} \
137156
linux_install_gitleaks && \
138157
linux_install_actionlint && \
139-
linux_install_github_cli"
158+
linux_install_github_cli && \
159+
linux_install_cmake"
140160
fi
141161
eval "${SETUP_CMD}"
142162

163+
143164
# Install poetry, either with pipx for ubuntu >= 23
144165
# or through regular pip for older ubuntu
145166
(pipx install poetry && pipx ensurepath) || \
146167
(\
147168
python3 -m pip install --no-cache-dir --upgrade pip && \
148-
python3 -m pip install --no-cache-dir --ignore-installed poetry==1.7.1 \
169+
python3 -m pip install --no-cache-dir --ignore-installed poetry==1.8.4 \
149170
);
150171
echo "PATH=$PATH:/home/dev_user/.local/bin/" >> ~/.bashrc
151172
elif [[ "${OS_NAME}" == "Darwin" ]]; then
@@ -157,7 +178,7 @@ elif [[ "${OS_NAME}" == "Darwin" ]]; then
157178

158179
brew install curl git git-lfs gitleaks graphviz jq make pandoc shellcheck openssl libomp actionlint unzip gh rsync
159180
python3 -m pip install -U pip
160-
python3 -m pip install poetry==1.7.1
181+
python3 -m pip install poetry==1.8.4
161182

162183
echo "Make is currently installed as gmake"
163184
echo 'If you need to use it as "make", you can add a "gnubin" directory to your PATH from your bashrc like:'

src/concrete/ml/sklearn/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1591,7 +1591,7 @@ def get_sklearn_params(self, deep: bool = True) -> dict:
15911591

15921592
params.pop("n_bits", None)
15931593
if "1.1." in sklearn.__version__:
1594-
params.pop("monotonic_cst", None)
1594+
params.pop("monotonic_cst", None) # pragma: no cover
15951595

15961596
return params
15971597

src/concrete/ml/sklearn/glm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ def get_sklearn_params(self, deep: bool = True) -> dict:
146146
params.pop("n_bits", None)
147147
# Remove sklearn 1.4 parameter when using sklearn 1.1
148148
if "1.1." in sklearn.__version__:
149-
params.pop("solver", None)
149+
params.pop("solver", None) # pragma: no cover
150150

151151
return params
152152

tests/torch/test_compile_torch.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -863,7 +863,6 @@ def test_pretrained_mnist_qat(
863863
quantized_numpy_module = compile_onnx_model(
864864
onnx_model,
865865
inputset,
866-
import_qat=True,
867866
configuration=default_configuration,
868867
n_bits=n_bits,
869868
verbose=verbose,

0 commit comments

Comments
 (0)
0