kentonl / e2e-coref

End-to-end Neural Coreference Resolution
Apache License 2.0
518 stars 174 forks source link

"genre Unable to open" Error #58

Open Rooders opened 5 years ago

Rooders commented 5 years ago

why report KeyError: "Unable to open object (object 'pt' doesn't exist)" when I use predict.py

AradAshrafi commented 5 years ago

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)"
henryhust commented 4 years ago

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.

CaoHoangTung commented 4 years ago

@AradAshrafi I'm having the same issue. Did you manage to fix it?

liyaoshigehaoren commented 4 years ago

Have you solved this problem? I have a similar problem