Skip to content

Commit

Permalink
fix: newer poetry, fix coverage, tests, cmake for py312
Browse files Browse the repository at this point in the history
  • Loading branch information
andrei-stoian-zama committed Dec 6, 2024
1 parent d63ef5e commit c9e944c
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 13 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/continuous-integration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ env:
jobs:
commit-checks:
name: Commit Checks
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
outputs:
commits_ok: ${{ steps.commit-conformance.outcome == 'success' }}
steps:
Expand Down Expand Up @@ -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-latest
runs-on: ubuntu-24.04
timeout-minutes: 5
outputs:
linux-matrix: ${{ steps.set-matrix.outputs.linux-matrix }}
Expand Down Expand Up @@ -295,7 +295,7 @@ jobs:
start-runner-linux:
needs: [commit-checks, matrix-preparation]
name: Start EC2 runner (Linux)
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
timeout-minutes: 15
outputs:
label-38: ${{ steps.start-ec2-runner-38.outputs.label }}
Expand Down Expand Up @@ -1025,7 +1025,7 @@ jobs:
linux-build-status:
name: Build Status (Linux)
needs: [build-linux]
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
timeout-minutes: 2
if: success() || failure()
steps:
Expand All @@ -1045,7 +1045,7 @@ jobs:
stop-runner-linux:
name: Stop EC2 runner (Linux)
needs: [build-linux, start-runner-linux]
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
timeout-minutes: 2
if: ${{ always() && (needs.start-runner-linux.result != 'skipped') }}
steps:
Expand Down Expand Up @@ -1186,7 +1186,7 @@ jobs:
decide-slack-report:
name: Decide Slack report
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
outputs:
send_slack_report: ${{ steps.set-decision.outputs.send_slack_report }}
steps:
Expand All @@ -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-latest
runs-on: ubuntu-24.04
if: |
always()
&& needs.matrix-preparation.result != 'skipped'
Expand Down Expand Up @@ -1310,7 +1310,7 @@ jobs:

stop-ec2-failure-slack-alert:
name: Stop EC2 failure Slack alert
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
if: |
always()
&& needs.matrix-preparation.result != 'skipped'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/prepare_release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update_licenses.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 8 additions & 0 deletions script/make_utils/setup_os_deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,14 @@ if [[ "${OS_NAME}" == "Linux" ]]; then
fi
eval "${SETUP_CMD}"

wget https://github.com/Kitware/CMake/releases/download/v3.31.2/cmake-3.31.2.tar.gz
tar xzvf cmake-3.31.2.tar.gz
cd cmake-3.31.2
./bootstrap
make -j$(nproc)
sudo make install
cd ../

# Install poetry, either with pipx for ubuntu >= 23
# or through regular pip for older ubuntu
(pipx install poetry && pipx ensurepath) || \
Expand Down
2 changes: 1 addition & 1 deletion src/concrete/ml/sklearn/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion src/concrete/ml/sklearn/glm.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 0 additions & 1 deletion tests/torch/test_compile_torch.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit c9e944c

Please sign in to comment.