diff --git a/.github/workflows/continuous-integration.yaml b/.github/workflows/continuous-integration.yaml index efdb22d98..9e37001b0 100644 --- a/.github/workflows/continuous-integration.yaml +++ b/.github/workflows/continuous-integration.yaml @@ -33,7 +33,7 @@ on: default: "3.8" manual_call: - description: "Do not uncheck this" + description: "Do not uncheck this!" type: boolean required: false default: true @@ -99,7 +99,7 @@ env: jobs: commit-checks: name: Commit Checks - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 outputs: commits_ok: ${{ steps.commit-conformance.outcome == 'success' }} steps: @@ -156,7 +156,7 @@ jobs: needs: [commit-checks] # We skip the CI in cases of pushing to internal main (because all pushes to main internal are now from the bot) if: ${{ !( github.repository != 'zama-ai/concrete-ml' && github.event_name == 'push' && github.ref == 'refs/heads/main' ) }} - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 timeout-minutes: 5 outputs: linux-matrix: ${{ steps.set-matrix.outputs.linux-matrix }} @@ -295,7 +295,7 @@ jobs: start-runner-linux: needs: [commit-checks, matrix-preparation] name: Start EC2 runner (Linux) - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 timeout-minutes: 15 outputs: label-38: ${{ steps.start-ec2-runner-38.outputs.label }} @@ -1025,7 +1025,7 @@ jobs: linux-build-status: name: Build Status (Linux) needs: [build-linux] - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 timeout-minutes: 2 if: success() || failure() steps: @@ -1045,7 +1045,7 @@ jobs: stop-runner-linux: name: Stop EC2 runner (Linux) needs: [build-linux, start-runner-linux] - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 timeout-minutes: 2 if: ${{ always() && (needs.start-runner-linux.result != 'skipped') }} steps: @@ -1186,7 +1186,7 @@ jobs: decide-slack-report: name: Decide Slack report - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 outputs: send_slack_report: ${{ steps.set-decision.outputs.send_slack_report }} steps: @@ -1211,7 +1211,7 @@ jobs: # if the job should be run or not in an previous job and store it in its output slack-report: name: Slack report - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 if: | always() && needs.matrix-preparation.result != 'skipped' @@ -1310,7 +1310,7 @@ jobs: stop-ec2-failure-slack-alert: name: Stop EC2 failure Slack alert - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 if: | always() && needs.matrix-preparation.result != 'skipped' diff --git a/.github/workflows/prepare_release.yaml b/.github/workflows/prepare_release.yaml index 0dd1b12ef..e36773b7d 100644 --- a/.github/workflows/prepare_release.yaml +++ b/.github/workflows/prepare_release.yaml @@ -61,7 +61,7 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - python -m pip install poetry==1.7.1 + python -m pip install poetry==1.8.4 make setup_env # Make sure that the workflow has been triggered from a release branch if this is a patch diff --git a/.github/workflows/update_licenses.yaml b/.github/workflows/update_licenses.yaml index 3eb4b55e1..55e646b68 100644 --- a/.github/workflows/update_licenses.yaml +++ b/.github/workflows/update_licenses.yaml @@ -85,7 +85,7 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - python -m pip install poetry==1.7.1 + python -m pip install poetry==1.8.4 make setup_env - name: Update licenses diff --git a/.github/workflows/weekly-pip-audit.yaml b/.github/workflows/weekly-pip-audit.yaml index f57d438ea..8b8bbf429 100644 --- a/.github/workflows/weekly-pip-audit.yaml +++ b/.github/workflows/weekly-pip-audit.yaml @@ -61,7 +61,7 @@ jobs: which pip3 python -m pip install --upgrade pip - python -m pip install poetry==1.7.1 + python -m pip install poetry==1.8.4 make setup_env - name: Run pip-audit diff --git a/Makefile b/Makefile index 2d9a24d95..50e38c9fb 100644 --- a/Makefile +++ b/Makefile @@ -19,7 +19,7 @@ CONCRETE_PACKAGE_PATH=$(SRC_DIR)/concrete COUNT?=1 RANDOMLY_SEED?=$$RANDOM PYTEST_OPTIONS:= -POETRY_VERSION:=1.7.1 +POETRY_VERSION:=1.8.4 APIDOCS_OUTPUT?="./docs/references/api" OPEN_PR="true" diff --git a/script/make_utils/setup_os_deps.sh b/script/make_utils/setup_os_deps.sh index c297089af..43e2dc302 100755 --- a/script/make_utils/setup_os_deps.sh +++ b/script/make_utils/setup_os_deps.sh @@ -89,6 +89,25 @@ linux_install_github_cli () { ${SUDO_BIN:+$SUDO_BIN} dpkg -i /home/dev_user/gh_${GH_CLI_VERSION}_linux_amd64.deb } +linux_install_cmake () { + ${SUDO_BIN:+$SUDO_BIN} apt-get update + ${SUDO_BIN:+$SUDO_BIN} apt-get -y install ca-certificates gpg wget + test -f /usr/share/doc/kitware-archive-keyring/copyright || + wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | \ + gpg --dearmor - | \ + ${SUDO_BIN:+$SUDO_BIN} tee /usr/share/keyrings/kitware-archive-keyring.gpg >/dev/null + echo 'deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ focal main' | \ + ${SUDO_BIN:+$SUDO_BIN} tee /etc/apt/sources.list.d/kitware.list >/dev/null + ${SUDO_BIN:+$SUDO_BIN} apt-get update + test -f /usr/share/doc/kitware-archive-keyring/copyright || \ + ${SUDO_BIN:+$SUDO_BIN} rm /usr/share/keyrings/kitware-archive-keyring.gpg + ${SUDO_BIN:+$SUDO_BIN} apt-get install -y kitware-archive-keyring + echo 'deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ focal-rc main' | \ + ${SUDO_BIN:+$SUDO_BIN} tee -a /etc/apt/sources.list.d/kitware.list >/dev/null + ${SUDO_BIN:+$SUDO_BIN} apt-get update + ${SUDO_BIN:+$SUDO_BIN} apt-get -y install cmake +} + OS_NAME=$(uname) if [[ "${OS_NAME}" == "Linux" ]]; then @@ -126,26 +145,28 @@ if [[ "${OS_NAME}" == "Linux" ]]; then jq \ make \ rsync \ - cmake \ unzip \ pandoc \ openssl \ shellcheck \ + libssl-dev \ texlive-latex-base texlive-latex-extra texlive-fonts-recommended texlive-xetex lmodern \ wget pipx && ${CLEAR_APT_LISTS:+$CLEAR_APT_LISTS} \ linux_install_gitleaks && \ linux_install_actionlint && \ - linux_install_github_cli" + linux_install_github_cli && \ + linux_install_cmake" fi eval "${SETUP_CMD}" + # Install poetry, either with pipx for ubuntu >= 23 # or through regular pip for older ubuntu (pipx install poetry && pipx ensurepath) || \ (\ python3 -m pip install --no-cache-dir --upgrade pip && \ - python3 -m pip install --no-cache-dir --ignore-installed poetry==1.7.1 \ + python3 -m pip install --no-cache-dir --ignore-installed poetry==1.8.4 \ ); echo "PATH=$PATH:/home/dev_user/.local/bin/" >> ~/.bashrc elif [[ "${OS_NAME}" == "Darwin" ]]; then @@ -157,7 +178,7 @@ elif [[ "${OS_NAME}" == "Darwin" ]]; then brew install curl git git-lfs gitleaks graphviz jq make pandoc shellcheck openssl libomp actionlint unzip gh rsync python3 -m pip install -U pip - python3 -m pip install poetry==1.7.1 + python3 -m pip install poetry==1.8.4 echo "Make is currently installed as gmake" echo 'If you need to use it as "make", you can add a "gnubin" directory to your PATH from your bashrc like:' diff --git a/src/concrete/ml/sklearn/base.py b/src/concrete/ml/sklearn/base.py index fa692b2ec..1390160d0 100644 --- a/src/concrete/ml/sklearn/base.py +++ b/src/concrete/ml/sklearn/base.py @@ -1591,7 +1591,7 @@ def get_sklearn_params(self, deep: bool = True) -> dict: params.pop("n_bits", None) if "1.1." in sklearn.__version__: - params.pop("monotonic_cst", None) + params.pop("monotonic_cst", None) # pragma: no cover return params diff --git a/src/concrete/ml/sklearn/glm.py b/src/concrete/ml/sklearn/glm.py index cd034f43e..ecdbcf56a 100644 --- a/src/concrete/ml/sklearn/glm.py +++ b/src/concrete/ml/sklearn/glm.py @@ -146,7 +146,7 @@ def get_sklearn_params(self, deep: bool = True) -> dict: params.pop("n_bits", None) # Remove sklearn 1.4 parameter when using sklearn 1.1 if "1.1." in sklearn.__version__: - params.pop("solver", None) + params.pop("solver", None) # pragma: no cover return params diff --git a/tests/torch/test_compile_torch.py b/tests/torch/test_compile_torch.py index 202def064..4abc0f5c9 100644 --- a/tests/torch/test_compile_torch.py +++ b/tests/torch/test_compile_torch.py @@ -863,7 +863,6 @@ def test_pretrained_mnist_qat( quantized_numpy_module = compile_onnx_model( onnx_model, inputset, - import_qat=True, configuration=default_configuration, n_bits=n_bits, verbose=verbose,