IsoNet-cryoET / IsoNet

Self-supervised learning for isotropic cryoET reconstruction
https://www.nature.com/articles/s41467-022-33957-8
MIT License
67 stars 12 forks source link

Cannot continue refinement #34

Closed rdrighetto closed 1 year ago

rdrighetto commented 1 year ago

Hi,

I'm trying to continue a previous refinement run of IsoNet v0.2 using the following command line:

isonet.py refine Position_5_72_d3_subtomo.star -result_dir Position_5_72_d3_results --gpuID $CUDA_VISIBLE_DEVICES --continue_from Position_5_72_d3_results/refine_iter10.json

However I get the following error:

09-23 15:14:46, INFO     
######Isonet starts refining######

09-23 15:14:46, INFO     
######Isonet Continues Refining######

09-23 15:15:08, INFO     Start Iteration11!
09-23 15:15:08, INFO     Continue from previous model: Position_5_72_d3_results/model_iter10.h5 of iteration 10 and predict subtomograms                 
09-23 15:15:08, INFO     Start predicting subtomograms!
09-23 15:16:54, INFO     Done predicting subtomograms!
09-23 15:16:54, ERROR    Traceback (most recent call last):
  File "/scicore/home/engel0006/GROUP/pool-engel/soft/isonet/IsoNet/bin/refine.py", line 100, in run
    if num_iter>=args.noise_start_iter[0] and (not os.path.isdir(args.noise_dir) or len(os.listdir(args.noise_dir))< num_noise_volume ):
UnboundLocalError: local variable 'num_noise_volume' referenced before assignment

Does anyone know how to fix this, or is this a bug?

Thank you!

procyontao commented 1 year ago

Hi,

I just modified code to fix this bug on master branch. I hope the the new commit will solve the problem.

rdrighetto commented 1 year ago

It works now, thanks!