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(external): ensure solo soft predict returns probs #2689

Merged
merged 2 commits into from Apr 5, 2024
Merged

Conversation

martinkim0
Copy link
Contributor

@martinkim0 martinkim0 commented Apr 4, 2024

BREAKING CHANGE: SOLO.predict used to incorrectly return logits instead of probabilities when soft=True (the default option). this pr fixes that but it is a breaking change.

closes #2688

@martinkim0 martinkim0 added on-merge: backport to 1.1.x on-merge: backport to 1.1.x on-merge: backport to 1.2.x on-merge: backport to 1.2.x labels Apr 4, 2024
@martinkim0 martinkim0 requested a review from canergen April 4, 2024 22:17
Copy link

codecov bot commented Apr 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.85%. Comparing base (1fff5b1) to head (b3db342).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2689      +/-   ##
==========================================
- Coverage   88.86%   88.85%   -0.02%     
==========================================
  Files         158      158              
  Lines       13247    13247              
==========================================
- Hits        11772    11770       -2     
- Misses       1475     1477       +2     
Files Coverage Δ
scvi/external/solo/_model.py 96.02% <100.00%> (+0.66%) ⬆️

... and 1 file with indirect coverage changes

@martinkim0 martinkim0 merged commit 6689386 into main Apr 5, 2024
12 checks passed
@martinkim0 martinkim0 deleted the solo-predict branch April 5, 2024 16:23
meeseeksmachine pushed a commit to meeseeksmachine/scvi-tools that referenced this pull request Apr 5, 2024
meeseeksmachine pushed a commit to meeseeksmachine/scvi-tools that referenced this pull request Apr 5, 2024
martinkim0 added a commit that referenced this pull request Apr 5, 2024
…edict returns probs) (#2690)

Backport PR #2689: fix(external): ensure solo soft predict returns probs

---------

Co-authored-by: Martin Kim <46072231+martinkim0@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
martinkim0 added a commit that referenced this pull request Apr 5, 2024
…edict returns probs) (#2691)

Backport PR #2689: fix(external): ensure solo soft predict returns probs

Co-authored-by: Martin Kim <46072231+martinkim0@users.noreply.github.com>
@canergen
Copy link
Contributor

canergen commented Apr 5, 2024

It needs to be labeled as breaking change. It might be some folks use softmax after SOLO (I do). I guess it's better to also print a warning about the change for scVI-tools 1.3.

@martinkim0
Copy link
Contributor Author

It needs to be labeled as breaking change. It might be some folks use softmax after SOLO (I do). I guess it's better to also print a warning about the change for scVI-tools 1.3.

Right - I forgot to do that. This is slated to be released with 1.1.3, should we revert it then? It's technically a bug fix so IMO it should be fine.

@canergen
Copy link
Contributor

canergen commented Apr 5, 2024

I think it's fine to release with 1.1.3 and I prefer outputting probabilities. I agree the code was wrong and not the documentation. However, we should highlight this change as it might affect analysis scripts. I'm open whether it outputs a warning or not but the release note should contain a breaking change.

@martinkim0
Copy link
Contributor Author

Makes sense! I'll add a warning and a note to the changelog.

martinkim0 added a commit that referenced this pull request Apr 8, 2024
#2697)

amends #2689 to add a note in the changelog as well as a warning noting
that it is a breaking change.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
on-merge: backport to 1.1.x on-merge: backport to 1.1.x on-merge: backport to 1.2.x on-merge: backport to 1.2.x
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Document SOLO.predict() return values better.
2 participants