Skip to content

Add SCVIDataModule, pytorch_scvi.ipynb #31

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Conversation

ryan-williams
Copy link
Member

@ryan-williams ryan-williams commented Mar 25, 2025

Porting @mlin's SCVIDataModule and pytorch_scvi.ipynb from chanzuckerberg/cellxgene-census#1368.

TODO:

  • Add tests?

@ryan-williams ryan-williams force-pushed the rw/scvi branch 4 times, most recently from 27010b1 to f20bd58 Compare March 25, 2025 21:31
@ryan-williams ryan-williams marked this pull request as ready for review March 25, 2025 23:22
mlin and others added 3 commits May 8, 2025 21:54
* Updating pytorch_scvi notebook to fix UMAP plots

* `pytorch_scvi.ipynb`: rm metadata, some warnings

* `pytorch_scvi`: update `nnz` comment

---------

Co-authored-by: Konstantinos Tsitsimpikos <kostas.t@tiledb.com>
Co-authored-by: Ryan Williams <ryan.williams@tiledb.com>
@ryan-williams ryan-williams requested a review from ktsitsi May 9, 2025 14:36
Comment on lines +108 to +109
if not inplace:
obs_df = obs_df.copy()
Copy link
Collaborator

@ktsitsi ktsitsi May 9, 2025

Choose a reason for hiding this comment

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

Since pandas is moving towards Copy-Over-Write logic soon (defauly behaviour in Pandas3.0 +). We may want to be proactive and remove this inplace behaviour

Copy link
Member Author

@ryan-williams ryan-williams May 12, 2025

Choose a reason for hiding this comment

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

_add_batch_col(inplace=True) is used at both call-sites in this file, to avoid an unnecessary copy. The implementation doesn't use any deprecated Pandas kwargs/APIs, and we'll want to support pandas<3 for some years, so I would leave this as-is.

Or: how would you propose rewriting it (without adding an unnecessary copy())?

@ryan-williams ryan-williams requested a review from ktsitsi May 12, 2025 20:22
@ryan-williams ryan-williams deleted the rw/scvi branch May 16, 2025 01:18
@ryan-williams ryan-williams restored the rw/scvi branch May 16, 2025 01:18
@ryan-williams ryan-williams reopened this May 16, 2025
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.

3 participants