-
-
Notifications
You must be signed in to change notification settings - Fork 26k
MNT Remove sklearn.utils.fixes.loguniform #23730
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
Conversation
We need to bump up the dependency of scipy to 1.5 or 1.6 in the Currently, the min-dependencies doc build fails with: Traceback (most recent call last):
File "/home/runner/mambaforge/envs/testenv/lib/python3.8/site-packages/sphinx/cmd/build.py", line 280, in build_main
app.build(args.force_all, filenames)
File "/home/runner/mambaforge/envs/testenv/lib/python3.8/site-packages/sphinx/application.py", line 387, in build
self.events.emit('build-finished', None)
File "/home/runner/mambaforge/envs/testenv/lib/python3.8/site-packages/sphinx/events.py", line 101, in emit
results.append(listener.handler(self.app, *args))
File "/home/runner/mambaforge/envs/testenv/lib/python3.8/site-packages/sphinx_gallery/gen_gallery.py", line 640, in summarize_failing_examples
raise ExtensionError(
sphinx.errors.ExtensionError: Here is a summary of the problems encountered when running the examples
Unexpected failing examples:
/home/runner/work/scikit-learn/scikit-learn/examples/gaussian_process/plot_compare_gpr_krr.py failed leaving traceback:
Traceback (most recent call last):
File "/home/runner/mambaforge/envs/testenv/lib/python3.8/site-packages/sphinx_gallery/gen_gallery.py", line 159, in call_memory
return 0., func()
File "/home/runner/mambaforge/envs/testenv/lib/python3.8/site-packages/sphinx_gallery/gen_rst.py", line 466, in __call__
exec(self.code, self.fake_main.__dict__)
File "/home/runner/work/scikit-learn/scikit-learn/examples/gaussian_process/plot_compare_gpr_krr.py", line 180, in <module>
from scipy.stats import loguniform
ImportError: cannot import name 'loguniform' from 'scipy.stats' (/home/runner/mambaforge/envs/testenv/lib/python3.8/site-packages/scipy/stats/__init__.py) |
As I tried to indicate in the related issue, we tend to do bump minimum requirements and update Basically I created the issue more as a reminder to ourselves than anything else ... |
Maybe we can leave this PR as it is for now and revisit when close to the next release :) |
Sounds good to me! |
Note for ourselves in a few months, there are still instances of It should be removed from the doc completely. Either we remove
|
Historically, we usually still deprecate over two versions for anything in Linking issue: I proposed a faster deprecation cycle for |
Looking at another PR: #22894 In that case we removed |
@MaxwellLZH do you want to reboot this PR now that other deprecation related PRs are getting merged for the upcoming release? |
I'll make a new PR for this |
Moving it to the 1.3 milestone since we did not bump scipy min version in the end. |
done in #24665 |
Reference Issues/PRs
Fixes #23699.
What does this implement/fix? Explain your changes.
Replaces
utils.fixes.loguniform
withscipy.stats.loguniform
, and removed corresponding test case.