ProteinDesignLab / protpardelle

Diffusion-based all-atom protein generative model.
MIT License
160 stars 14 forks source link

Leftover references to "sampling" in draw_samples.py #6

Closed Gullfaxi29 closed 3 months ago

Gullfaxi29 commented 5 months ago

Hey ProteinDesignLab,

I just had a bit of trouble running a pipeline my lab has been using with protpardelle that ran previous without issue in ~Jan 2024. Looks like there has been a bug introduced in the draw_samples.py script.

In the March commit (https://github.com/ProteinDesignLab/protpardelle/commit/bbae6e418394ba95590424a4c151d444c46ce3d0) sampling.py has been renamed to inference.py and the import statement in draw_samples.py has been updated to reflect that. However there are still references to "sampling" rather than "inference" library in the script (lines 42, 58, 184, and 186) so it's throwing a NameError.

e.g.

python draw_samples.py --type allatom --minlen 184 --maxlen 185 --steplen 1 --perlen 1

gives

Namespace(model_checkpoint='checkpoints', mpnnpath='checkpoints/minimpnn_state_dict.pth', modeldir=None, modelepoch=None, type='allatom', param=None, paramval=None, parampath=None, perlen=1, minlen=184, maxlen=185, steplen=1, num_lens=None, targetdir='.', input_pdb=None, resample_idxs=None) Traceback (most recent call last): File "/content/protpardelle/draw_samples.py", line 356, in main() File "/content/protpardelle/draw_samples.py", line 186, in main sampling_config = sampling.default_allatom_sampling_config() NameError: name 'sampling' is not defined

All the best,

Alex

zhkim216 commented 5 months ago

Hello Gullfaxi29, Sorry for replying late and thank you for your interest in our model! It seems like the issue will be solved if you change the name of inference.py to sampling.py. If it doesn't solve your issue, please leave the comment here. Also, we're currently updating the code and will fix this issue soon, maybe in this week :)