Hi, I am getting the following error when calling this function with two 10.000 molecules lists.
UnknownError: Graph execution error:
2 root error(s) found.
(0) UNKNOWN: IndexError: string index out of range
Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/tensorflow/python/ops/script_ops.py", line 271, in __call__
ret = func(*args)
File "/usr/local/lib/python3.7/dist-packages/tensorflow/python/autograph/impl/api.py", line 642, in wrapper
return func(*args, **kwargs)
File "/usr/local/lib/python3.7/dist-packages/tensorflow/python/data/ops/dataset_ops.py", line 1004, in generator_py_func
values = next(generator_state.get_iterator(iterator_id))
File "/usr/local/lib/python3.7/dist-packages/keras/engine/data_adapter.py", line 830, in wrapped_generator
for data in generator_fn():
File "/usr/local/lib/python3.7/dist-packages/fcd/FCD.py", line 156, in myGenerator_predict
smiEnc = get_one_hot(currentSmiles, pad_len=nn)
File "/usr/local/lib/python3.7/dist-packages/fcd/FCD.py", line 127, in get_one_hot
if smiles[i + 1] in ['r', 'i', 'l']:
IndexError: string index out of range
[[{{node PyFunc}}]]
[[IteratorGetNext]]
[[IteratorGetNext/_2]]
(1) UNKNOWN: IndexError: string index out of range
Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/tensorflow/python/ops/script_ops.py", line 271, in __call__
ret = func(*args)
File "/usr/local/lib/python3.7/dist-packages/tensorflow/python/autograph/impl/api.py", line 642, in wrapper
return func(*args, **kwargs)
File "/usr/local/lib/python3.7/dist-packages/tensorflow/python/data/ops/dataset_ops.py", line 1004, in generator_py_func
values = next(generator_state.get_iterator(iterator_id))
File "/usr/local/lib/python3.7/dist-packages/keras/engine/data_adapter.py", line 830, in wrapped_generator
for data in generator_fn():
File "/usr/local/lib/python3.7/dist-packages/fcd/FCD.py", line 156, in myGenerator_predict
smiEnc = get_one_hot(currentSmiles, pad_len=nn)
File "/usr/local/lib/python3.7/dist-packages/fcd/FCD.py", line 127, in get_one_hot
if smiles[i + 1] in ['r', 'i', 'l']:
IndexError: string index out of range
[[{{node PyFunc}}]]
[[IteratorGetNext]]
0 successful operations.
0 derived errors ignored. [Op:__inference_predict_function_2176]
I have an feeling that it might be related to the smiles I generated but I am not a 100% sure. Could you confirm this is the case?
Thanks