Skip to content

Commit

Permalink
Backport PR #2189: Add docstring for scanvi unlabeled category (#2190)
Browse files Browse the repository at this point in the history
Co-authored-by: Martin Kim <[email protected]>
  • Loading branch information
meeseeksmachine and martinkim0 authored Jul 17, 2023
1 parent 17d609b commit 25e0690
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
2 changes: 2 additions & 0 deletions docs/release_notes/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ is available in the [commit logs](https://github.com/YosefLab/scvi-tools/commits

- Fix bug in {class}`scvi.model.base.PyroSviTrainMixin` where `training_plan`
argument is ignored {pr}`2162`.
- Fix missing docstring for `unlabeled_category` in
{class}`scvi.model.SCANVI.setup_anndata` and reorder arguments {pr}`2189`.

### 1.0.2 (2023-07-05)

Expand Down
3 changes: 2 additions & 1 deletion scvi/model/_scanvi.py
Original file line number Diff line number Diff line change
Expand Up @@ -457,9 +457,10 @@ def setup_anndata(
Parameters
----------
%(param_adata)s
%(param_labels_key)s
%(param_unlabeled_category)s
%(param_layer)s
%(param_batch_key)s
%(param_labels_key)s
%(param_size_factor_key)s
%(param_cat_cov_keys)s
%(param_cont_cov_keys)s
Expand Down
5 changes: 5 additions & 0 deletions scvi/utils/_docstrings.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,10 @@
(i.e., the model tries to minimize their effects on the latent space). Thus, these should not be used for
biologically-relevant factors that you do _not_ want to correct for."""

param_unlabeled_category = """\
unlabeled_category
value in `adata.obs[labels_key]` that indicates unlabeled observations."""

param_modalities = """\
modalities
Dictionary mapping parameters to modalities."""
Expand Down Expand Up @@ -175,6 +179,7 @@
param_cat_cov_keys=param_cat_cov_keys,
param_cont_cov_keys=param_cont_cov_keys,
param_size_factor_key=param_size_factor_key,
param_unlabeled_category=param_unlabeled_category,
param_modalities=param_modalities,
param_copy=param_copy,
returns=returns,
Expand Down

0 comments on commit 25e0690

Please sign in to comment.