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

Remove unnecessary version warning #162

Merged
merged 1 commit into from
Apr 5, 2022

Conversation

anishathalye
Copy link
Member

This was used to skip e.g. importing PyTorch on some tests. However, PyTorch supports all versions of Python that Cleanlab supports, so there's no need to issue this warning. Furthermore, having this kind of code in our codebase increases maintenance burden and contributes to user frustration. If we mark a version of some library as unsupported, but the library adds support for it in the future, there's no way users can use the two packages together without waiting for us to push a new version of cleanlab that marks that it's compatible and then switching to the new version, which may be painful for unrelated reasons. It's better to not have these kinds of checks; if users are using a version of Python that's unsupported by some other library that they want to use, that's not our problem, and they'll have issues installing or importing it and figure it out themselves.

Note: this patch doesn't remove the version warnings in the fastText-related code because #161 deletes that code.

@codecov
Copy link

codecov bot commented Apr 3, 2022

Codecov Report

Merging #162 (332a4cf) into master (3f17be6) will decrease coverage by 0.08%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #162      +/-   ##
==========================================
- Coverage   87.64%   87.56%   -0.09%     
==========================================
  Files          12       12              
  Lines        1028     1021       -7     
  Branches      191      189       -2     
==========================================
- Hits          901      894       -7     
  Misses        104      104              
  Partials       23       23              
Impacted Files Coverage Δ
cleanlab/classification.py 96.00% <ø> (ø)
cleanlab/internal/util.py 100.00% <ø> (ø)
cleanlab/example_models/mnist_pytorch.py 99.27% <100.00%> (+0.79%) ⬆️
cleanlab/filter.py 91.19% <0.00%> (-0.63%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3f17be6...332a4cf. Read the comment docs.

This was used to skip e.g. importing PyTorch on some tests. However,
PyTorch supports all versions of Python that Cleanlab supports, so
there's no need to issue this warning. Furthermore, having this kind of
code in our codebase increases maintenance burden and contributes to
user frustration. If we mark a version of some library as unsupported,
but the library adds support for it in the future, there's no way users
can use the two packages together without waiting for us to push a new
version of cleanlab that marks that it's compatible and then switching
to the new version, which may be painful for unrelated reasons. It's
better to not have these kinds of checks; if users are using a version
of Python that's unsupported by some other library that they want to
use, that's not our problem, and they'll have issues installing or
importing it and figure it out themselves.

This patch also removes mentions of Python 2.
Copy link
Member

@jwmueller jwmueller left a comment

Choose a reason for hiding this comment

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

LGTM but will defer to @cgnorthcutt to merge

Copy link
Member

@cgnorthcutt cgnorthcutt left a comment

Choose a reason for hiding this comment

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

LGTM. We may have future dependencies requiring version warnings in the future, but I see no need to keep this code around while it is not at all in use or plans to be in use for the foreseeable future.

  • Effectively we are saying that we will support all versions of python 3.6 and up and if you use pytorch or external libraries that don't support a version of python that cleanlab, supports, this will fail and you'll get a generic warning that you need to figure out. Overall, seems okay given that most libraries we interact with support similar versions than we do. It certainly makes the code a lot cleaner :)

@cgnorthcutt cgnorthcutt merged commit 5e50623 into cleanlab:master Apr 5, 2022
@anishathalye anishathalye deleted the version-warning branch April 7, 2022 11:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants