Skip to content

Commit

Permalink
chore(external): add note and warning for solo predict breaking change (
Browse files Browse the repository at this point in the history
#2697)

amends #2689 to add a note in the changelog as well as a warning noting
that it is a breaking change.
  • Loading branch information
martinkim0 authored Apr 8, 2024
1 parent 6689386 commit 1b3d0b9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ is available in the [commit logs](https://github.com/scverse/scvi-tools/commits/

#### Fixed

- Fix {meth}`scvi.external.SOLO.predict` to correctly return probabiities instead of logits
when passing in `soft=True` {pr}`2689`.
- Breaking change: Fix {meth}`scvi.external.SOLO.predict` to correctly return probabiities
instead of logits when passing in `soft=True` (the default option) {pr}`2689`.

### 1.1.2 (2024-03-01)

Expand Down
8 changes: 8 additions & 0 deletions scvi/external/solo/_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,14 @@ def predict(self, soft: bool = True, include_simulated_doublets: bool = False) -
-------
DataFrame with prediction, index corresponding to cell barcode.
"""
warnings.warn(
"Prior to scvi-tools 1.1.3, `SOLO.predict` with `soft=True` (the default option) "
"returned logits instead of probabilities. This behavior has since been corrected to "
"return probabiltiies.",
UserWarning,
stacklevel=settings.warnings_stacklevel,
)

adata = self._validate_anndata(None)
scdl = self._make_data_loader(adata=adata)

Expand Down

0 comments on commit 1b3d0b9

Please sign in to comment.