Skip to content

[MNT] clean-up source imports#525

Merged
jpaillard merged 5 commits into
mainfrom
cleanup_source_imports
Nov 10, 2025
Merged

[MNT] clean-up source imports#525
jpaillard merged 5 commits into
mainfrom
cleanup_source_imports

Conversation

@jpaillard
Copy link
Copy Markdown
Collaborator

  • Rename functions of the new API with the suffix "analysis" as introduced in [API 2]: CFI, PFI, LOCO #372. For Methods that have not yet been refactored, I will do it in their respective PRs
  • Remove reid, quantile_aggregation from the source imports

@codecov
Copy link
Copy Markdown

codecov Bot commented Nov 7, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.00%. Comparing base (acb8e20) to head (7dfaefc).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #525      +/-   ##
==========================================
- Coverage   99.00%   99.00%   -0.01%     
==========================================
  Files          24       24              
  Lines        1506     1505       -1     
==========================================
- Hits         1491     1490       -1     
  Misses         15       15              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jpaillard jpaillard requested a review from bthirion November 7, 2025 14:32
@bthirion
Copy link
Copy Markdown
Collaborator

bthirion commented Nov 7, 2025

The PR is technically correct. I'm not a big fan of appending the "_analysis" which makes name longer without adding much. But IIRC you wanted that for the sake of clarity ?

@jpaillard
Copy link
Copy Markdown
Collaborator Author

Yes, maybe we can find a better alternative.
I think having loco and LOCO (same for all other methods) that only differ from using capital letters is error prone.
In sklearn for instance they have Ridge and ridge_regression, which I belive makes it less likely for a user to make mistakes in imports.

@bthirion
Copy link
Copy Markdown
Collaborator

bthirion commented Nov 8, 2025

Yes, maybe we can find a better alternative. I think having loco and LOCO (same for all other methods) that only differ from using capital letters is error prone. In sklearn for instance they have Ridge and ridge_regression, which I belive makes it less likely for a user to make mistakes in imports.

OK, so then, let's take loco_importance for the time being.

@jpaillard
Copy link
Copy Markdown
Collaborator Author

@bthirion, I renamed all functions with the suffix API.
There's also a problem with the rendering of their docstring, which was not introduced in this PR. I reported it in an issue: #528

@jpaillard jpaillard merged commit c458319 into main Nov 10, 2025
24 checks passed
@jpaillard jpaillard deleted the cleanup_source_imports branch November 10, 2025 08: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.

2 participants