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

[MAINT] deal with new warnings related to sklearn 1.3 #3801

Merged
merged 10 commits into from Jul 5, 2023

Conversation

Remi-Gau
Copy link
Collaborator

@Remi-Gau Remi-Gau commented Jul 4, 2023

Relates to #3800

Changes proposed in this pull request:

silence some warnings in doc build:

  • setting defaults for dual explicitly in LinearSVC
  • settings default in when fitting sklearn.linear_model.OrthogonalMatchingPursuit

@github-actions
Copy link
Contributor

github-actions bot commented Jul 4, 2023

👋 @Remi-Gau Thanks for creating a PR!

Until this PR is ready for review, you can include the [WIP] tag in its title, or leave it as a github draft.

Please make sure it is compliant with our contributing guidelines. In particular, be sure it checks the boxes listed below.

  • PR has an interpretable title.
  • PR links to Github issue with mention Closes #XXXX (see our documentation on PR structure)
  • Code is PEP8-compliant (see our documentation on coding style)
  • Changelog or what's new entry in doc/changes/latest.rst (see our documentation on PR structure)

For new features:

  • There is at least one unit test per new function / class (see our documentation on testing)
  • The new feature is demoed in at least one relevant example.

For bug fixes:

  • There is at least one test that would fail under the original bug conditions.

We will review it as quick as possible, feel free to ping us with questions if needed.

@Remi-Gau Remi-Gau changed the title set dual defaults for LinearSVC [MAINT] deal with new warnings related to sklearn 1.3 Jul 4, 2023
@codecov
Copy link

codecov bot commented Jul 4, 2023

Codecov Report

Merging #3801 (c074e46) into main (9356227) will decrease coverage by 0.01%.
The diff coverage is 60.00%.

@@            Coverage Diff             @@
##             main    #3801      +/-   ##
==========================================
- Coverage   91.52%   91.51%   -0.01%     
==========================================
  Files         133      133              
  Lines       15561    15577      +16     
  Branches     3229     3234       +5     
==========================================
+ Hits        14242    14256      +14     
- Misses        772      774       +2     
  Partials      547      547              
Flag Coverage Δ
macos-latest_3.10 91.44% <60.00%> (-0.01%) ⬇️
macos-latest_3.11 91.44% <60.00%> (-0.01%) ⬇️
macos-latest_3.8 91.40% <60.00%> (-0.01%) ⬇️
macos-latest_3.9 91.40% <60.00%> (-0.01%) ⬇️
ubuntu-latest_3.10 91.44% <60.00%> (-0.01%) ⬇️
ubuntu-latest_3.11 91.44% <60.00%> (-0.01%) ⬇️
ubuntu-latest_3.8 91.40% <60.00%> (-0.01%) ⬇️
ubuntu-latest_3.9 91.40% <60.00%> (-0.01%) ⬇️
windows-latest_3.11 91.38% <60.00%> (-0.01%) ⬇️
windows-latest_3.8 91.34% <60.00%> (-0.01%) ⬇️
windows-latest_3.9 91.34% <60.00%> (-0.01%) ⬇️

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

Impacted Files Coverage Δ
nilearn/decoding/decoder.py 96.88% <ø> (ø)
nilearn/regions/parcellations.py 98.19% <ø> (ø)
nilearn/decoding/searchlight.py 93.50% <33.33%> (-2.50%) ⬇️
nilearn/decomposition/dict_learning.py 89.06% <100.00%> (ø)
nilearn/glm/first_level/first_level.py 93.79% <100.00%> (ø)

... and 11 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

.fit(stimuli.reshape(-1, 100)[train], fmri_data[train])
.predict(stimuli.reshape(-1, 100)[test])
)
predictions = estimator.fit(
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

estimator is defined above but was not used in this file

Copy link
Member

@ymzayek ymzayek left a comment

Choose a reason for hiding this comment

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

If relevant, we can probably also make the changes to unit tests in this PR. For example the warning for the dual default shows up in nilearn/decoding/tests/test_searchlight.py, see https://github.com/nilearn/nilearn/actions/runs/5454471723/jobs/9924639057?pr=3801#step:8:5327

Copy link
Member

@bthirion bthirion left a comment

Choose a reason for hiding this comment

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

LGTM so far


if self.verbose:
print("[DictLearning] Learning dictionary")
# TODO: turn n_iter to max_iter when dropping python 3.7
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

probably worth opening an issue to track some of the things we may want to check when dropping python 3.7

Copy link
Member

Choose a reason for hiding this comment

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

It doesn't hurt, but we can also open a new milestone for release 0.11 and document there because that will be when we drop 3.7

@Remi-Gau Remi-Gau marked this pull request as ready for review July 5, 2023 07:32
Copy link
Member

@ymzayek ymzayek left a comment

Choose a reason for hiding this comment

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

LGTM otherwise!

examples/02_decoding/plot_miyawaki_reconstruction.py Outdated Show resolved Hide resolved
@Remi-Gau Remi-Gau mentioned this pull request Jul 5, 2023
9 tasks
@Remi-Gau
Copy link
Collaborator Author

Remi-Gau commented Jul 5, 2023

thanks for the review @ymzayek

@Remi-Gau Remi-Gau merged commit 1b11edf into nilearn:main Jul 5, 2023
28 of 29 checks passed
@Remi-Gau Remi-Gau deleted the rm_warn branch July 5, 2023 13:49
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