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

Upgrade Python version to 3.11 #2278

Merged
merged 5 commits into from
Mar 12, 2024

Conversation

tenzen-y
Copy link
Member

@tenzen-y tenzen-y commented Mar 10, 2024

What this PR does / why we need it:
I upgraded the Python version to 3.11 since Python 3.10 no longer fixes bugs, according to this.

Also, I upgraded some libraries to switch Python 3.11 supported version:

Additionally, we keep the library and Python version for the skopt since some dependencies error occurs due to stopped maintenance: #2280.

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #

Checklist:

  • Docs included if any changes are user facing

Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: tenzen-y

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@tenzen-y tenzen-y changed the title Upgrade Python version to 3.11 WIP: Upgrade Python version to 3.11 Mar 10, 2024
@tenzen-y
Copy link
Member Author

/hold

We need to upgrade other library versions first.

@@ -45,7 +45,7 @@ runtime:
image: docker.io/kubeflowkatib/suggestion-enas:latest
resources:
limits:
memory: 200Mi
memory: 400Mi
Copy link
Member Author

Choose a reason for hiding this comment

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

After I upgraded the Python version, I faced OOM killed in the ENAS suggestion service.

@tenzen-y tenzen-y force-pushed the upgrade-python-3.11 branch from 9e33a4b to 1ab6dc5 Compare March 10, 2024 14:56
@tenzen-y tenzen-y force-pushed the upgrade-python-3.11 branch 7 times, most recently from 93248d1 to 600fbb2 Compare March 10, 2024 17:42
Signed-off-by: Yuki Iwai <yuki.iwai.tz@gmail.com>
Signed-off-by: Yuki Iwai <yuki.iwai.tz@gmail.com>
Signed-off-by: Yuki Iwai <yuki.iwai.tz@gmail.com>
Signed-off-by: Yuki Iwai <yuki.iwai.tz@gmail.com>
@tenzen-y tenzen-y force-pushed the upgrade-python-3.11 branch from 600fbb2 to 28a14f7 Compare March 12, 2024 00:13
Signed-off-by: Yuki Iwai <yuki.iwai.tz@gmail.com>
@tenzen-y tenzen-y force-pushed the upgrade-python-3.11 branch from 28a14f7 to 75821d6 Compare March 12, 2024 00:33
@tenzen-y tenzen-y changed the title WIP: Upgrade Python version to 3.11 Upgrade Python version to 3.11 Mar 12, 2024
@tenzen-y
Copy link
Member Author

Ready for the review. PTAL.

/assign @andreyvelich @johnugeorge

@tenzen-y
Copy link
Member Author

/hold cancel

Copy link
Member

@andreyvelich andreyvelich left a comment

Choose a reason for hiding this comment

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

Thank you @tenzen-y!
A few questions:

  1. Do we want to add support for Python 3.11 in Katib SDK: https://github.com/kubeflow/katib/blob/master/sdk/python/v1beta1/setup.py#L61 ?
  2. Do we want to add this change before the next Katib release ?

@tenzen-y
Copy link
Member Author

Thank you @tenzen-y! A few questions:

  1. Do we want to add support for Python 3.11 in Katib SDK: https://github.com/kubeflow/katib/blob/master/sdk/python/v1beta1/setup.py#L61 ?
  2. Do we want to add this change before the next Katib release ?

@andreyvelich It's a good question.

  1. I agree with you. If so, should we remove Python 3.7 from the list as Python 3.7 is no longer supported?
  2. Adding support in this PR would be better since we can verify if our SDK with Python 3.11 can work for a while by adding CI:

@andreyvelich
Copy link
Member

I agree with you. If so, should we remove Python 3.7 from the list as Python 3.7 is no longer supported?

How strict we want to be with our SDK versions since it is user facing interface and sometimes users might be on the out-of-date environments ?
For example, Kubernetes Python client still supports Python 3.6 and 3.7: https://github.com/kubernetes-client/python/blob/master/setup.py#L80.

However, I prefer approach which Jupyter Lab and Jupyter Server follow where they add minimal Python version that is supported by today.

Could you give your feedback on this @kubeflow/wg-training-leads @droctothorpe @shipengcheng1230 @andreafehrman @harrisonfritz

@tenzen-y
Copy link
Member Author

How strict we want to be with our SDK versions since it is user facing interface and sometimes users might be on the out-of-date environments ? For example, Kubernetes Python client still supports Python 3.6 and 3.7: https://github.com/kubernetes-client/python/blob/master/setup.py#L80.

However, I prefer approach which Jupyter Lab and Jupyter Server follow where they add minimal Python version that is supported by today.

I'm ok with either way, but I believe that we should define deprecation or support policies for SDK with Python version.
For example, we decided to support 3 Kubernets minor versions.

So, should we keep supported Python versions in this PR, and then open a dedicated issue and discuss the Python version?
This means that I should not add Python 3.11 to SDK and should not remove Python 3.7 from SDK.

@andreyvelich WDYt?

@andreyvelich
Copy link
Member

So, should we keep supported Python versions in this PR, and then open a dedicated issue and discuss the Python version?
This means that I should not add Python 3.11 to SDK and should not remove Python 3.7 from SDK.

That's fine I believe. Let's create dedicated issue to discuss long-term support for SDK Python versions.

@tenzen-y
Copy link
Member Author

So, should we keep supported Python versions in this PR, and then open a dedicated issue and discuss the Python version?
This means that I should not add Python 3.11 to SDK and should not remove Python 3.7 from SDK.

That's fine I believe. Let's create dedicated issue to discuss long-term support for SDK Python versions.

I created: #2283

@tenzen-y
Copy link
Member Author

@andreyvelich So, can we merge this?

@andreyvelich
Copy link
Member

Yeah, let's merge it!
/lgtm

@google-oss-prow google-oss-prow bot added the lgtm label Mar 12, 2024
@google-oss-prow google-oss-prow bot merged commit 6f372f6 into kubeflow:master Mar 12, 2024
60 checks passed
@tenzen-y tenzen-y deleted the upgrade-python-3.11 branch March 12, 2024 19:56
Mu-Magdy pushed a commit to Mu-Magdy/katib that referenced this pull request Mar 17, 2024
* Upgrade Python version to 3.11

Signed-off-by: Yuki Iwai <yuki.iwai.tz@gmail.com>

* Upgrade the numpy version to 1.25.2

Signed-off-by: Yuki Iwai <yuki.iwai.tz@gmail.com>

* Increase resource requests for the ENAS suggestion service

Signed-off-by: Yuki Iwai <yuki.iwai.tz@gmail.com>

* Update pytest CI

Signed-off-by: Yuki Iwai <yuki.iwai.tz@gmail.com>

* Prepare dedicated pytest for skopt

Signed-off-by: Yuki Iwai <yuki.iwai.tz@gmail.com>

---------

Signed-off-by: Yuki Iwai <yuki.iwai.tz@gmail.com>
Signed-off-by: Muhammed Magdy <muhammedmagdy1015@gmail.com>
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.

3 participants