snap-stanford / GEARS

GEARS is a geometric deep learning model that predicts outcomes of novel multi-gene perturbations
MIT License
189 stars 38 forks source link

traing stack using the v0.10.0 gears #33

Closed weizhiting closed 10 months ago

weizhiting commented 10 months ago

Hi, thanks for updating the gears to v0.10.0 but when i run this version, it seems stack in training the model. following is the message output by gears.

" 63 Done! 64 Local copy of split is detected. Loading... 65 Simulation split test composition: 66 combo_seen0:0 67 combo_seen1:0 68 combo_seen2:0 69 unseen_single:388 70 Done! 71 Creating dataloaders.... 72 Done! 73 Found local copy... 74 Start Training... 75 >envs/gears/lib/python3.9/site-packages/gears/model.py(217)forward() 76 -> return torch.stack(out) 77 (Pdb)

"

yhr91 commented 10 months ago

Sorry, I don't understand your question

talashuach commented 10 months ago

I'm running into the same issue.

Essentially - the model doesn't train. Upon calling the model.train method, it prints:

>>> gears_model.train(epochs = 10, lr = 1e-3)
Start Training...
> /opt/conda/lib/python3.8/site-packages/gears/model.py(217)forward()
-> return torch.stack(out)
(Pdb) 

And seems to launch a Pdb (python debugger) terminal-like interface, and no training actually happens.

Importantly - this doesn't happen when I train a model in a Jupyter notebook, it only happens when working directly in a terminal.

Not sure how to fix this and get the model to train properly.

yhr91 commented 10 months ago

Thanks for pointing this out. I may have accidentally left a breakpoint in the code. Would you mind confirming if you're using the latest version of the pip package. And can you share the code you run so I can reproduce on my end.

talashuach commented 10 months ago

I was using the most recent pip package. I downgraded to 0.0.3 (pip version) and that seems to have solved the issue for now, but I'm not sure which commit that maps to.

I can try to install the most recent version of the code from git, I'm not sure if the pip version is identical. I couldn't find any breakpoints in the repo.

In terms of the code - I'm using a custom dataset, but I'm following the tutorials verbatim. Thanks!

yhr91 commented 10 months ago

Sorry about that. I just fixed the bug and the latest pip version 0.1.1 should work fine with no breakpoint