Skip to content

Conversation

LouiseDck
Copy link

As shown in issue #103

When calling model.batch_removal(), eventually scvi's VAEmixin.get_latent_reprentation gets called, which checks the outputs of the module.inference call.
It checks for the presence of MODULE_KEYS.QZ_KEY (with value "qz"), and failing that, assumes that there is MODULE_KEYS.QZM_KEY (value qzm) and MODULE_KEYS.QZV_KEY (value qzv) present.
In the output dictionary, these keys are respectively qz_m and qz_v, resulting in the error.

It would be better to directly use the MODULE_KEYS.{key}, but these don't seem to be exported from scvi-tools.

@ge2sasag
Copy link

ge2sasag commented Jul 3, 2025

Hi!

I just got this same error as another person was reporting before. How to install the corrected version?
I tried with

pip install screen
pip install git+https://github.com/theislab/scgen.git@master

both return the same error

Thanks in advance for any help on this
Gema

Screenshot 2025-07-03 at 18 24 53

@LouiseDck
Copy link
Author

LouiseDck commented Jul 3, 2025

Hi! You can install this version either by installing the version of the repo I forked and adapted:

pip install git+https://github.com/LouiseDck/scgen

Or by installing this unmerged PR like this:

pip install git+https://github.com/theislab/scgen.git@refs/pull/104/head

Both pieces of code should do exactly the same thing.
Hope this helps!

@ge2sasag
Copy link

ge2sasag commented Jul 4, 2025

It worked, thanks! :)

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.

2 participants