e2e-coref
e2e-coref copied to clipboard
"genre Unable to open" Error
why report KeyError: "Unable to open object (object 'pt' doesn't exist)" when I use predict.py
I have the same issue. the error is this:
Traceback (most recent call last):
File "predict.py", line 30, in <module>
tensorized_example = model.tensorize_example(example, is_training=False)
File "/content/e2e-coref/coref_model.py", line 161, in tensorize_example
lm_emb = self.load_lm_embeddings(doc_key)
File "/content/e2e-coref/coref_model.py", line 100, in load_lm_embeddings
group = self.lm_file[file_key]
File "h5py/_objects.pyx", line 54, in h5py._objects.with_phil.wrapper
File "h5py/_objects.pyx", line 55, in h5py._objects.with_phil.wrapper
File "/usr/local/lib/python2.7/dist-packages/h5py/_hl/group.py", line 177, in __getitem__
oid = h5o.open(self.id, self._e(name), lapl=self._lapl)
File "h5py/_objects.pyx", line 54, in h5py._objects.with_phil.wrapper
File "h5py/_objects.pyx", line 55, in h5py._objects.with_phil.wrapper
File "h5py/h5o.pyx", line 190, in h5py.h5o.open
KeyError: "Unable to open object (object 'nw' doesn't exist)"
why report KeyError: "Unable to open object (object 'pt' doesn't exist)" when I use predict.py
Because the hdf5 stores the embeeding which already preprocessed before, if the word is not in the hdf5, it will get this problem "object 'XXX' doesn't exist".it just like the key in the dict. so, you should preprocess the data which you will use in the prediction.
@AradAshrafi I'm having the same issue. Did you manage to fix it?
Have you solved this problem? I have a similar problem