-
Notifications
You must be signed in to change notification settings - Fork 83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When running,I have an error #9
Comments
Traceback (most recent call last): |
Hi @gaojunhui68, Both errors come (obviously) from different sources. Particularly, the first is using the molecular metrics, and the second is using the music metrics. In both cases, it looks like you are using different training sets in the run and the checkpoint, so the engine is unable to decode (because the internal dictionary does not recognize the features. If you give me more information (i. e., the actual file that you run), I'll be able to give you more information. Regards, |
Hi @couteiral, Yes, the first is using the molecular metrics, and the second is using the music metrics. For the first, the code of example.py is in bellow: import organ For the second , the code of example.py is in bellow: from organ import ORGAN model = ORGAN('test', 'music_metrics') # Loads a ORGANIC with name 'test', using music metrics In both cases ,this error occurs in train, after pretrain. Please help me . |
Hi @gaojunhui68, First, the music metrics seem to be bugged. I am afraid I didn't work on them myself, but I'll get in touch with someone involved, and get back to you. Regarding the molecular metrics, you get a In particular, you are passing 'O' to the Could you share your pretraining files, so I can have a look at them? Also, are you sure that there is nothing wrong with your 'toy.csv' training set? Cheers, |
Hi @couteiral, I had the same error as @gaojunhui68. What I did was:
The error message was
I used pyenv. Both anaconda3-5.0.0 and anaconda2-5.0.0 did not work. |
Hi @couteiral, Any update for the previous posts? The error message I got is KeyError: 'N' I was also running the example.py. It happened at "model.train(ckpt_dir='ckpt')", after finished the pre-training. It looks like it was happened at the same spot like the KeyError: 'O'. Traceback (most recent call last): Is there anyway to pin point which smiles made the problem? Thanks in advance! |
It looks like this issue is related to the data set. For the toy set, I found there are > 30 entries with empty smiles, i.e. have NumAtom, Name, but the smiles column are empty. From there I further refined the data set with rdkit. With all these trials, I got different KeyError(s), 'C', '[', 'O'. This means the data set still has something wrong! Or a filter is needed before processing the data just like "ORGANIC" does. |
Hi @couteiral, Could you run the code use your |
Hi @couterial, Have a look of some simple debug. def decode(ords, ord_dict): Here are the last few lines printed out before it crashes: It looks like this is an already decoded smile, which should not be sent back to decode again. |
Hello @couteiral I ran my code line by line to see where the problem occurs. I see that after importing the dataset with model.load_training_set('data/toy.csv') the error comes up. Traceback (most recent call last): Any solutions? |
I have the same error with @ahylton19 . Traceback (most recent call last): |
I have the same error with @Kajiyu Any solutions? |
we will be updating the repo soon, we expect these changes to be incorporated by monday, latest tuesday...stay tuned, they will fix these issues. |
I have the same error with @xuzhang5788 |
I checked the table of SMILES and it seems that '.' represents one kind of bond and in the mol_metrics.py file they didn't add it. To fix the error please modify line 315 to
I guess it works as long as you add '.' to chars. |
When running,I have an error: |
When running,I have an error:
Traceback (most recent call last):
File "example.py", line 9, in
model.train(ckpt_dir='ckpt')
File "D:\mypy\ORGAN-master\organ_init_.py", line 763, in train
gen_samples, self.train_samples, self.ord_dict, results)
File "D:\mypy\ORGAN-master\organ\mol_metrics.py", line 185, in compute_results
results[objective] = np.mean(reward(verified_samples, train_data))
File "D:\mypy\ORGAN-master\organ_init_.py", line 743, in batch_reward
for sample in samples]
File "D:\mypy\ORGAN-master\organ_init_.py", line 743, in
for sample in samples]
File "D:\mypy\ORGAN-master\organ\mol_metrics.py", line 117, in decode
''.join([ord_dict[o] for o in ords]))
File "D:\mypy\ORGAN-master\organ\mol_metrics.py", line 117, in
''.join([ord_dict[o] for o in ords]))
KeyError: 'O'
The text was updated successfully, but these errors were encountered: