theislab / trVAE

Conditional out-of-distribution prediction
MIT License
53 stars 11 forks source link

trVAE error in `self.cvae_model.evaluate` #10

Closed LuckyMD closed 3 years ago

LuckyMD commented 3 years ago

Hey @Naghipourfar @M0hammadL ,

I'm running trVAE as part of our benchmarking (PR here), and I'm getting the following error:

|Traceback (most recent call last):
  File "scripts/runIntegration.py", line 69, in <module>
    runIntegration(file, out, run, hvg, batch)
  File "scripts/runIntegration.py", line 30, in runIntegration
    integrated = method(adata, batch)
  File "/mnt/home/icb/malte.luecken/benchmarking_data_integration/Benchmarking_data_integration/scIB/integration.py", line 70, in runTrVae
    save=False,
  File "/home/icb/daniel.strobl/miniconda3/envs/benchmarking_data_integration_dev/lib/python3.7/site-packages/trvae/models/_trvae.py", line 830, in train
    verbose)
  File "/home/icb/daniel.strobl/miniconda3/envs/benchmarking_data_integration_dev/lib/python3.7/site-packages/trvae/models/_trvae.py", line 771, in _train_on_batch
    valid_loss, valid_recon_loss, valid_mmd_loss = self.cvae_model.evaluate(x_valid, y_valid, verbose=0)
ValueError: not enough values to unpack (expected 3, got 0)|
M0hammadL commented 3 years ago

Hey @LuckyMD it seems in your code you have set train_size=1.0 that means there is no validation data for the model to validate the results. please set it to 0.9. https://github.com/theislab/scib/blob/c92622a3ca57e922f7533356ff7631d944ca9bd1/scIB/integration.py#L64

LuckyMD commented 3 years ago

okay, so no training on the full dataset even for batch removal?

LuckyMD commented 3 years ago

will test to see if this works.