Skip to content

Model: DiagVI (new)#3575

Open
ori-kron-wis wants to merge 231 commits intoscverse:mainfrom
quadbio:feature/spatial
Open

Model: DiagVI (new)#3575
ori-kron-wis wants to merge 231 commits intoscverse:mainfrom
quadbio:feature/spatial

Conversation

@ori-kron-wis
Copy link
Copy Markdown
Collaborator

No description provided.

WinterHannah and others added 30 commits May 13, 2025 16:41
Update feature branch to match upstream/main
…test-linux

Chore/ci disable schedule test linux
…-in-glue

2 basic batch encoding like in glue
…nce-graph-merge

merge to fix divergent branches
Update test_linux_custom_dataloader.yml
Copy link
Copy Markdown
Collaborator Author

@ori-kron-wis ori-kron-wis left a comment

Choose a reason for hiding this comment

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

Impressive work, everyone involved. See my several comments for review.

Comment thread src/scvi/utils/_metrics.py Outdated
Comment thread src/scvi/distributions/_lognormal.py Outdated
Comment thread src/scvi/distributions/_lognormal.py
Comment thread src/scvi/distributions/_gamma.py Outdated
Comment thread src/scvi/distributions/_gamma.py
Comment thread src/scvi/distributions/_lognormal.py Outdated
Comment thread src/scvi/external/diagvi/_utils.py Outdated
Comment thread src/scvi/external/diagvi/_model.py
Comment thread src/scvi/external/diagvi/_model.py Outdated
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

is there a test to validate the functionality of: predict_celltype, posterior_predictive_sample scarches, semi-supervised training, minification, DE & DA (new in latest version) in diagvi? those will probably be used/tried by users

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

There are tests covering predict_celltype, posterior_predictive_sample, and semi-supervised training. DiagVI currently does not support scArches or minification, but we plan to add that support in the future (which requires some adaptation due to DiagVI’s multi-adata / multi-modality structure). The same applies to DE and DA.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

OK. It's fine like this; we will add any capability down the road when needed.

Comment thread docs/user_guide/models/diagvi.md
return self.__class__.__name__ + "(" + args_string + ")"


class Log1pNormal(Distribution):
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Won't just using the LogNormal above with log1p function (in the generative part) be enough to save more code? Alternatively, add a "p" parameter with a default 0 (potentially 1) and use one of the classes only.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

We now removed the LogNormal class and let ZeroInflatedLogNormal inherit from torch.distributions.LogNormal. We would therefore keep Log1pNormal as it is. Do you agree with that, or would you rather implement a more general LogNormal class with a "p" parameter?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

It's fine, probably enough for most cases in sc.

Comment thread pyproject.toml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

on-merge: backport to 1.4.x on-merge: backport to 1.4.x

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants