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

fix: stop using distutils (for python 3.12) [MLG-1519] #8667

Merged
merged 1 commit into from
Jan 9, 2024

Conversation

rb-determined-ai
Copy link
Contributor

distutils is removed in python 3.12. We shouldn't really be using it anyway, but rather than do a breaking change to switch to the behavior I want us to have, here's a quick fix that unbreaks us, and I made a ticket to do the breaking change at some point in the future.

Note that to manifest the failure, you'll need to uninstall setuptools from your python environment (which provides its own distutils package starting in python 3.12).

Test Plan

  • manually tested that a python 3.12 environment without this fix (and without setuptools) breaks during det -h. With the fix, things work.

distutils is removed in python 3.12.  We shouldn't really be using it
anyway, but rather than do a breaking change to switch to the behavior I
want us to have, here's a quick fix that unbreaks us, and I made a
ticket to do the breaking change at some point in the future.

Note that to manifest the failure, you'll need to uninstall setuptools
from your python environment (which provides its own distutils package
starting in python 3.12).
@rb-determined-ai rb-determined-ai requested a review from a team as a code owner January 9, 2024 16:58
@cla-bot cla-bot bot added the cla-signed label Jan 9, 2024
Copy link

netlify bot commented Jan 9, 2024

Deploy Preview for determined-ui canceled.

Name Link
🔨 Latest commit e56b386
🔍 Latest deploy log https://app.netlify.com/sites/determined-ui/deploys/659d7b533eacaf0008352901

Copy link

codecov bot commented Jan 9, 2024

Codecov Report

Attention: 10 lines in your changes are missing coverage. Please review.

Comparison is base (1e8baee) 51.47% compared to head (e56b386) 51.46%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8667      +/-   ##
==========================================
- Coverage   51.47%   51.46%   -0.02%     
==========================================
  Files         882      882              
  Lines      156059   156068       +9     
  Branches     2085     2085              
==========================================
- Hits        80332    80319      -13     
- Misses      74243    74260      +17     
- Partials     1484     1489       +5     
Flag Coverage Δ
backend 36.10% <ø> (-0.04%) ⬇️
harness 64.28% <33.33%> (-0.01%) ⬇️
web 53.77% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
harness/determined/cli/experiment.py 23.22% <ø> (-0.15%) ⬇️
harness/determined/common/declarative_argparse.py 97.24% <0.00%> (-0.03%) ⬇️
harness/determined/common/util.py 75.35% <50.00%> (-0.37%) ⬇️
harness/determined/pytorch/_pytorch_context.py 72.77% <50.00%> (-0.34%) ⬇️
...determined/pytorch/deepspeed/_deepspeed_context.py 80.36% <50.00%> (-0.89%) ⬇️
...s/determined/tensorboard/metric_writers/pytorch.py 75.00% <0.00%> (-10.72%) ⬇️

... and 4 files with indirect coverage changes

Copy link
Contributor

@MikhailKardash MikhailKardash left a comment

Choose a reason for hiding this comment

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

LGTM

@rb-determined-ai rb-determined-ai merged commit 4f4ef5a into main Jan 9, 2024
24 of 25 checks passed
@rb-determined-ai rb-determined-ai deleted the rb/distutils branch January 9, 2024 17:20
@dannysauer dannysauer modified the milestone: 0.27.1 Feb 6, 2024
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