Error in training resolvi model

Hello,

I am running the tutorial for ResolVI. However when I get to the line of code supervised_resolvi.train(max_epochs=50)I get the following error.

Exception raised during training. <class ‘NameError’> Input arguments must all be instances of Number, torch.Tensor or objects implementing _torch_function_.

Does anyone know what the issue could be?

I am using version 2.9.1+cu128 of torch and 1.4.1 in scvi tools.

Thank you for your help and happy holidays.

Best Regards,
Sam

It exists for me as well. Im not sure which package update is responsible for this (numpy, torch, pyro, and so on), but a simple fix exists:

Thanks for fixing. Please keep in mind that we have seen similar issues in the past when not filtering out low counts cells (less than 10 counts). Also in an updated guideline downsample counts should be False by default for sequencing based approaches (by experience).

Thank you both very much for your quick responses. Setting downsample to False worked. However, I have Xenium data which is probe based. Would you still recommend setting downsample to False?

Also, I know this is a naive question, but could you provide instructions on how to install the latest branch of scvi-tools so I can have the fix ori-kron-wis mentioned above?

Thank you very much!

it is actually part of the main branch already, so you can install it with:

pip install git+https://github.com/scverse/scvi-tools@main

Thank you very much!