biomed-AI / PROTAC-RL

MIT License
54 stars 23 forks source link

ModuleNotFoundError: No module named 'onmt.reinforce.score_util' #4

Open Jacyll opened 1 year ago

Jacyll commented 1 year ago

I get the following error when I run the train_case.sh script after fine-tune-training.sh:

training RL model train_agent_ms.py Traceback (most recent call last): File "train_agent_ms.py", line 8, in from onmt.reinforce.trainer_ms import build_rl_ms_trainer File "/home/test_file/PROTAC-RL-main/onmt/reinforce/trainer_ms.py", line 29, in from onmt.reinforce.scoring_functions import get_scoring_function File "/home/test_file/PROTAC-RL-main/onmt/reinforce/scoring_functions.py", line 22, in from onmt.reinforce.score_util import calc_SC_RDKit_score ModuleNotFoundError: No module named 'onmt.reinforce.score_util'

It appears that the uploaded files are incomplete. There is a missing function onmt.reinforce.score_util* in this file.

yjianzhu commented 1 year ago

I've met the same error and just delete line 22 in "/home/test_file/PROTAC-RL-main/onmt/reinforce/scoring_functions.py".

xiejuande commented 4 months ago

I've met the same error and just delete line 22 in "/home/test_file/PROTAC-RL-main/onmt/reinforce/scoring_functions.py".

Hello, after that, do you meet the error about "UnboundLocalError: local variable 'smiles_sequences_standard' referenced before assignment" when running "bash train_case.sh" like follows: training RL model train_agent_ms.py sample_rate:16000 window_size:0.02 window_stride:0.01 window:hamming image_channel_size:3 scoring_function:PK score_function_num_processes:2 [2024-05-09 17:54:25,061 INFO] Start training... [2024-05-09 17:54:25,064 INFO] cur device: cuda [2024-05-09 17:54:25,068 INFO] C(=O)C[C@@H]1N=C(c2ccc(Cl)cc2)c2c(sc(C)c2C)-n2c(C)nnc21.*c1cccc2c1C(=O)N(C1CCC(=O)NC1=O)C2=O [2024-05-09 17:54:25,068 INFO] Cc1sc2c(c1C)C(c1ccc(Cl)cc1)=NC@@HC3=O)c1nnc(C)n1-2 [2024-05-09 17:54:28,768 INFO] Step ------ 0; [2024-05-09 17:54:28,769 INFO] loss ::: 1484.64404296875, score: 0.5641969442367554, lr: (1e-05, 1e-05) [2024-05-09 17:54:28,769 INFO] agent_likelihood:-7.786715030670166, augmented_likelihood: 26.06537628173828, prior_likelihood:-7.786439418792725 [2024-05-09 17:54:28,804 INFO] Step 0;Fraction valid SMILES: 100.0 [2024-05-09 17:54:28,804 INFO] samples: Traceback (most recent call last): File "train_agent_ms.py", line 40, in main(opt, logger) File "train_agent_ms.py", line 27, in main logger=logger) File "/lustre/home/jxie/soft/PROTAC-RL/onmt/reinforce/trainer_ms.py", line 417, in train info(smiles_sequences_standard[i]) UnboundLocalError: local variable 'smiles_sequences_standard' referenced before assignment