Open Alfa-1 opened 1 year ago
I second @Alfa-1 comments about adding the torch.save(pred_emb, model_name_variable_here) as this would make the end-to-end predictor/decoder pipeline possible. I think having this would be a great addition and simplification to the end user's experience running your code.
Hi,
in predict_embs.py file, there are several unnecessary empty lines causing the indent error. They can be deleted as follows::
if name == 'main': parser = argparse.ArgumentParser() parser.add_argument('-pos_low_file', type=str, default=None, help='csv file with positive mode [M+H]+ low energy spectrum') parser.add_argument('-pos_high_file', type=str, default=None, help='csv file with positive mode [M+H]+ high energy spectrum') parser.add_argument('-neg_low_file', type=str, default=None, help='csv file with positive mode [M-H]+ low energy spectrum') parser.add_argument('-neg_high_file', type=str, default=None, help='csv file with positive mode [M-H]- low energy spectrum') args = parser.parse_args() main(args)
In addition, a command for saving pre_emb is missing in predict_embs.py (e.g. torch.save(pred_emb, 'sample_my.pt')).
Finally, it would be very helpful to write a wrapper to couple the embs predictor with the decoder and to add an automatic setting of the unknown keys when processing the example input data.