juglab / cryoCARE_pip

PIP package of cryoCARE
BSD 3-Clause "New" or "Revised" License
26 stars 14 forks source link

path variable has to be the same for preparation, training and prediction #4

Closed thorstenwagner closed 2 years ago

thorstenwagner commented 2 years ago

Hi,

your tutorials reads like that the path variable in the data preparation step could be different to the path used during training and prediction. But if you do this, you will end up in the following error:

1   Traceback·(most·recent·call·last):✂                                              
  1 ··File·"/mnt/beegfs/software/em/automatic_installs/miniconda3_envs/cryocare_0.1.1/bin/cryoCARE_predict.py",·line·56,·in·<module>✂
  2 ····main()✂                                                                      
  3 ··File·"/mnt/beegfs/software/em/automatic_installs/miniconda3_envs/cryocare_0.1.1/bin/cryoCARE_predict.py",·line·24,·in·main✂
  4 ····dm.load(config['path'])✂                                                     
  5 ··File·"/mnt/beegfs/software/em/automatic_installs/miniconda3_envs/cryocare_0.1.1/lib/python3.8/site-packages/cryocare/internals/CryoCAREDataModule.py",·line·201,·in·load✂
  6 ····self.train_dataset·=·CryoCARE_Dataset.load(join(path,·'train_data.npz'))✂    
  7 ··File·"/mnt/beegfs/software/em/automatic_installs/miniconda3_envs/cryocare_0.1.1/lib/python3.8/site-packages/cryocare/internals/CryoCAREDataModule.py",·line·56,·in·load✂
  8 ····tmp·=·np.load(path)✂                                                         
  9 ··File·"/mnt/beegfs/software/em/automatic_installs/miniconda3_envs/cryocare_0.1.1/lib/python3.8/site-packages/numpy/lib/npyio.py",·line·417,·in·load✂
 10 ····fid·=·stack.enter_context(open(os_fspath(file),·"rb"))✂                      
 11 FileNotFoundError:·[Errno·2]·No·such·file·or·directory:·'./train_data.npz'✂ 

So the path variable needs to be the same for all three steps.