Skip to content

Commit

Permalink
Merge branch 'ori-2907-custom-dataloader-registry' of https://github.…
Browse files Browse the repository at this point in the history
…com/scverse/scvi-tools into ori-2907-custom-dataloader-registry
  • Loading branch information
canergen committed Jan 9, 2025
2 parents 874935b + 61f2e27 commit f2c63bd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
3 changes: 2 additions & 1 deletion src/scvi/model/_scvi.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,8 @@ def __init__(

n_batch = self.summary_stats.n_batch
use_size_factor_key = self.registry_["setup_args"][
f"{REGISTRY_KEYS.SIZE_FACTOR_KEY}_key"]
f"{REGISTRY_KEYS.SIZE_FACTOR_KEY}_key"
]
library_log_means, library_log_vars = None, None
if (
not use_size_factor_key
Expand Down
7 changes: 3 additions & 4 deletions tests/dataloaders/test_custom_dataloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,16 +214,15 @@ def test_lamindb_dataloader_scvi(save_path: str):

model.save("lamin_model", save_anndata=False, overwrite=True)
model_query = model.load_query_data(
adata=False,
reference_model="lamin_model",
registry=datamodule.registry)
adata=False, reference_model="lamin_model", registry=datamodule.registry
)
model_query.train(max_epochs=1, datamodule=datamodule)
_ = model_query.get_elbo(dataloader=dataloader)
_ = model_query.get_marginal_ll(dataloader=dataloader)
_ = model_query.get_reconstruction_error(dataloader=dataloader)
_ = model_query.get_latent_representation(dataloader=dataloader)

adata = collection.load(join='inner')
adata = collection.load(join="inner")
model_query_adata = model.load_query_data(adata=adata, reference_model="lamin_model")
adata = collection.load(join="inner")
model_query_adata = model.load_query_data(adata)
Expand Down

0 comments on commit f2c63bd

Please sign in to comment.