connorcoley / rexgen_direct

Template-free prediction of organic reaction outcomes
GNU General Public License v3.0
151 stars 69 forks source link

Error while trying to train the model #1

Closed SachinAgrawal123 closed 6 years ago

SachinAgrawal123 commented 6 years ago

Hi,

I tried training the model using the following command:

python nntrain.py --train ../data/train.txt

I get the following error:

Traceback (most recent call last):
  File "/scratch/scratch1/ee14b104/miniconda2/envs/rexgen/lib/python2.7/threading.py", line 801, in __bootstrap_inner
    self.run()
  File "/scratch/scratch1/ee14b104/miniconda2/envs/rexgen/lib/python2.7/threading.py", line 754, in run
    self.__target(*self.__args, **self.__kwargs)
  File "nntrain_direct.py", line 178, in read_data
    cur_bin, cur_label, sp_label = get_all_batch(zip(src_batch, edit_batch))
  File "/scratch/scratch1/ee14b104/rexgen_direct/rexgen_direct/core_wln_global/ioutils_direct.py", line 90, in get_all_batch
    l, sl = get_bond_label(r,e,max_natoms)
  File "/scratch/scratch1/ee14b104/rexgen_direct/rexgen_direct/core_wln_global/ioutils_direct.py", line 58, in get_bond_label
    a1,a2,bo = s.split('-')
ValueError: need more than 2 values to unpack

Basically the edit string has only two entities indicating the two atoms which are being affected. However, it does not contain the bond order in the dataset.

How can I resolve this issue?

SachinAgrawal123 commented 6 years ago

Hi,

I was using the .tar.gz data file. It works with the .proc.tar.gz data file