Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Support 3.12 python #847

Merged
merged 19 commits into from
Dec 4, 2024
Merged

Conversation

bcm-at-zama
Copy link
Collaborator

@bcm-at-zama bcm-at-zama commented Aug 27, 2024

@cla-bot cla-bot bot added the cla-signed label Aug 27, 2024
@bcm-at-zama bcm-at-zama changed the base branch from main to support_python3.11_3774 August 27, 2024 14:28
@bcm-at-zama bcm-at-zama changed the title We might support 3 12 python [WIP] We might support 3.12 python [WIP] Aug 27, 2024
@bcm-at-zama bcm-at-zama force-pushed the we_might_support_3_12_python branch from 2fbfee6 to 162765e Compare August 27, 2024 14:51
Base automatically changed from support_python3.11_3774 to main August 27, 2024 15:11
@bcm-at-zama bcm-at-zama force-pushed the we_might_support_3_12_python branch 3 times, most recently from 4c4632b to 11292f7 Compare August 27, 2024 15:22
@bcm-at-zama
Copy link
Collaborator Author

Apparently, there are already things to fix regarding CP for 3.11, https://zama-ai.slack.com/archives/C044G400J6N/p1724831478822349?thread_ts=1724772713.112659&cid=C044G400J6N

So let's wait here

@bcm-at-zama
Copy link
Collaborator Author

CP 3.11 installation was fixed: it was a bad command line.

@bcm-at-zama
Copy link
Collaborator Author

@andrei-stoian-zama could you give a try to this branch with 3.12, please? if it works locally for you, we might merge this.

@bcm-at-zama
Copy link
Collaborator Author

Looks good to me, but I haven't ran it on 3.12.

@bcm-at-zama bcm-at-zama marked this pull request as ready for review August 28, 2024 15:10
@bcm-at-zama bcm-at-zama requested a review from a team as a code owner August 28, 2024 15:10
@bcm-at-zama bcm-at-zama changed the title We might support 3.12 python [WIP] We might support 3.12 python Aug 28, 2024
@bcm-at-zama
Copy link
Collaborator Author

Added a reversible commit to try 3.12 on the PR

@bcm-at-zama
Copy link
Collaborator Author

We have an issue in make sync_env:

 • Installing websocket-client (1.8.0)

  ChefBuildError

  Backend 'setuptools.build_meta:__legacy__' is not available.
  
  Cannot import 'setuptools.build_meta'

  at /opt/hostedtoolcache/Python/3.12.5/x64/lib/python3.12/site-packages/poetry/installation/chef.py:164 in _prepare
      160│ 
      161│                 error = ChefBuildError("\n\n".join(message_parts))
      162│ 
      163│             if error is not None:
    → 164│                 raise error from None
      165│ 
      166│             return path
      167│ 
      168│     def _prepare_sdist(self, archive: Path, destination: Path | None = None) -> Path:

Note: This error originates from the build backend, and is likely not a problem with poetry but with numpy (1.23.5) not supporting PEP 517 builds. You can verify this by running 'pip wheel --no-cache-dir --use-pep517 "numpy (==1.23.5)"'.

make: *** [Makefile:32: setup_env] Error 1

@bcm-at-zama
Copy link
Collaborator Author

Trying on my machine

@bcm-at-zama
Copy link
Collaborator Author

Trying to see if I can change a bit the toml and make sync_env with 3.12

@bcm-at-zama
Copy link
Collaborator Author

Well, already, CP is not installable with 3.12, I'm going to ask the team:

python --version
Python 3.12.5

python -m pip install concrete-python
Looking in indexes: https://pypi.org/simple, https://pypi.zama.ai/cpu
ERROR: Could not find a version that satisfies the requirement concrete-python (from versions: none)
ERROR: No matching distribution found for concrete-python

@bcm-at-zama
Copy link
Collaborator Author

@bcm-at-zama bcm-at-zama changed the title We might support 3.12 python We might support 3.12 python [blocked by CP] Aug 28, 2024
@bcm-at-zama
Copy link
Collaborator Author

@andrei-stoian-zama : do I let you finish this PR?

@andrei-stoian-zama andrei-stoian-zama force-pushed the we_might_support_3_12_python branch from f430aa8 to 3a75af8 Compare October 29, 2024 15:00
pyproject.toml Outdated Show resolved Hide resolved
pyproject.toml Outdated Show resolved Hide resolved
@andrei-stoian-zama andrei-stoian-zama force-pushed the we_might_support_3_12_python branch from 12bd910 to a043f51 Compare November 25, 2024 21:21
Copy link

⚠️ Known flaky tests have been rerun ⚠️

One or several tests initially failed but were identified as known flaky. tests. Therefore, they have been rerun and passed. See below for more details.

Failed tests details

Known flaky tests that initially failed:

  • tests/torch/test_compile_torch.py::test_compile_torch_or_onnx_conv_networks[True-True-CNN_conv1d-relu]

Copy link
Collaborator

@jfrery jfrery left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We still need the CML 3.12 test to pass -> https://github.com/zama-ai/concrete-ml/actions/runs/12032176976

@@ -24,7 +24,7 @@
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": null,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some notebooks haven't run normally, it's worth refreshing them with the CI action

@andrei-stoian-zama andrei-stoian-zama force-pushed the we_might_support_3_12_python branch from 61e9e25 to 867988e Compare December 2, 2024 10:41
@andrei-stoian-zama andrei-stoian-zama changed the title We might support 3.12 python [blocked by CP] feat: Support 3.12 python Dec 2, 2024
Copy link

github-actions bot commented Dec 2, 2024

Coverage passed ✅

Coverage details

---------- coverage: platform linux, python 3.8.18-final-0 -----------
Name    Stmts   Miss  Cover   Missing
-------------------------------------
TOTAL    8440      0   100%

62 files skipped due to complete coverage.

Copy link
Collaborator

@jfrery jfrery left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for the test speed up!

@andrei-stoian-zama andrei-stoian-zama merged commit 0edf038 into main Dec 4, 2024
17 checks passed
@andrei-stoian-zama andrei-stoian-zama deleted the we_might_support_3_12_python branch December 4, 2024 10:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants