Dumitrescu-Alexandru / TSignal

MIT License
6 stars 2 forks source link

FileNotFoundError: [Errno 2] No such file or directory: 'sp6_dicts.bin' #2

Closed cnzclp closed 1 year ago

cnzclp commented 1 year ago

Hi, an error occurred. can you help me ? Thanks!

python main.py --test_seqs ./sp_data/some_test_seqs.bin  --test_mdl deployment_sep_pe_swa_extra_inpemb_on_gen_best_eval_only_dec.pth --tune_bert --train_only_decoder --compute_saliency

Machine not recognized. Will assume your data is inside sp_data/ relative to the main project folder
Traceback (most recent call last):
  File "main.py", line 235, in <module>
    test_seqs_w_pretrained_mdl(args.test_mdl, args.test_seqs, tune_bert=args.tune_bert, saliency_map_save_fn=args.saliency_map_save_fn,hook_layer=args.hook_layer, compute_saliency=args.compute_saliency)
  File "/home/TSignal/train_scripts/cv_train_cs_predictors.py", line 1855, in test_seqs_w_pretrained_mdl
    sp_data = SPCSpredictionData(form_sp_reg_data=False, tune_bert=tune_bert)
  File "/home/TSignal/sp_data/data_utils.py", line 87, in __init__
    self.lbl2ind, self.og2ind, self.glbl_lbl_2ind, self.aa2ind = pickle.load(open("sp6_dicts.bin", "rb"))
FileNotFoundError: [Errno 2] No such file or directory: 'sp6_dicts.bin'
cnzclp commented 1 year ago

How to make the file "sp6_dicts.bin" when make prediction on new data?

Dumitrescu-Alexandru commented 1 year ago

Hi! Thank you for noticing!

I have added the dictionary in the last commit. Please tell me if any other issues come up.

cnzclp commented 1 year ago

I got it! Thanks!