Giter VIP home page Giter VIP logo

hrere's People

Contributors

billy-inn avatar lfoppiano avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

hrere's Issues

No such file or directory: './data/grouped_train.pkl'

I'm trying to reproduce your results and I've downloaded and installed your tools, and by following your tutorial I managed to reach this point:

(tensorflow) a017873@yomite:~/development/relationship_extraction/HRERE$ python task.py --model best_real_hrere  --eval 10  --runs 10
Loading data...                                                                                                                                                                                   
  0%|                                                                                                                                                        | 0/10 [00:00<?, ?it/s, best loss: ?]
Traceback (most recent call last):
  File "task.py", line 326, in <module>
    main(options)
  File "task.py", line 320, in main
    optimizer.run()
  File "task.py", line 291, in run
    tpe.suggest, self.max_evals, trials)
  File "/home/a017873/.conda/envs/tensorflow/lib/python3.7/site-packages/hyperopt/fmin.py", line 388, in fmin
    show_progressbar=show_progressbar,
  File "/home/a017873/.conda/envs/tensorflow/lib/python3.7/site-packages/hyperopt/base.py", line 639, in fmin
    show_progressbar=show_progressbar)
  File "/home/a017873/.conda/envs/tensorflow/lib/python3.7/site-packages/hyperopt/fmin.py", line 407, in fmin
    rval.exhaust()
  File "/home/a017873/.conda/envs/tensorflow/lib/python3.7/site-packages/hyperopt/fmin.py", line 262, in exhaust
    self.run(self.max_evals - n_done, block_until_done=self.asynchronous)
  File "/home/a017873/.conda/envs/tensorflow/lib/python3.7/site-packages/hyperopt/fmin.py", line 227, in run
    self.serial_evaluate()
  File "/home/a017873/.conda/envs/tensorflow/lib/python3.7/site-packages/hyperopt/fmin.py", line 141, in serial_evaluate
    result = self.domain.evaluate(spec, ctrl)
  File "/home/a017873/.conda/envs/tensorflow/lib/python3.7/site-packages/hyperopt/base.py", line 844, in evaluate
    rval = self.fn(pyll_rval)
  File "task.py", line 275, in _obj
    self.task = Task(self.model_name, self.runs, param_dict, self.logger)
  File "task.py", line 24, in __init__
    words, positions, heads, tails, labels = pkl_utils._load(config.GROUPED_TRAIN_DATA)
  File "/home/a017873/development/relationship_extraction/HRERE/utils/pkl_utils.py", line 8, in _load
    with open(fname, "rb") as f:
FileNotFoundError: [Errno 2] No such file or directory: './data/grouped_train.pkl'

I looked everywhere and could not find this file. Am I missing something?

Thank you in advance

Wrong number of labels in rel2id

Dear Authors,
The NYT dataset has 57+1 relation types however, in your rel2id.txt, there are only 54+1 relation types. What is the cause of such discrepancy? How should we mitigate such an issue?

No such file or directory: './data/entity.npy'

I'm sorry, again me. I've tried again the whole process from scratch, and I've reached until the same point as #2 but now I have a new error:

(tensorflow) a017873@yomite:~/development/relationship_extraction/HRERE$ python task.py --model best_real_hrere  --eval 10  --runs 10
Loading data...                                                                                                                                                                                   
  0%|                                                                                                                                                        | 0/10 [00:00<?, ?it/s, best loss: ?]/home/a017873/.conda/envs/tensorflow/lib/python3.7/site-packages/smart_open/smart_open_lib.py:398: UserWarning: This function is deprecated, use smart_open.open instead. See the migration notes for details: https://github.com/RaRe-Technologies/smart_open/blob/master/README.rst#migrating-to-the-new-open-function
  'See the migration notes for details: %s' % _MIGRATION_NOTES_URL

101397 unique tokens have been found!                                                                                                                                                             
Preprocessing data...                                                                                                                                                                             
  0%|                                                                                                                                                        | 0/10 [07:40<?, ?it/s, best loss: ?]
Traceback (most recent call last):
  File "task.py", line 326, in <module>
    main(options)
  File "task.py", line 320, in main
    optimizer.run()
  File "task.py", line 291, in run
    tpe.suggest, self.max_evals, trials)
  File "/home/a017873/.conda/envs/tensorflow/lib/python3.7/site-packages/hyperopt/fmin.py", line 388, in fmin
    show_progressbar=show_progressbar,
  File "/home/a017873/.conda/envs/tensorflow/lib/python3.7/site-packages/hyperopt/base.py", line 639, in fmin
    show_progressbar=show_progressbar)
  File "/home/a017873/.conda/envs/tensorflow/lib/python3.7/site-packages/hyperopt/fmin.py", line 407, in fmin
    rval.exhaust()
  File "/home/a017873/.conda/envs/tensorflow/lib/python3.7/site-packages/hyperopt/fmin.py", line 262, in exhaust
    self.run(self.max_evals - n_done, block_until_done=self.asynchronous)
  File "/home/a017873/.conda/envs/tensorflow/lib/python3.7/site-packages/hyperopt/fmin.py", line 227, in run
    self.serial_evaluate()
  File "/home/a017873/.conda/envs/tensorflow/lib/python3.7/site-packages/hyperopt/fmin.py", line 141, in serial_evaluate
    result = self.domain.evaluate(spec, ctrl)
  File "/home/a017873/.conda/envs/tensorflow/lib/python3.7/site-packages/hyperopt/base.py", line 844, in evaluate
    rval = self.fn(pyll_rval)
  File "task.py", line 275, in _obj
    self.task = Task(self.model_name, self.runs, param_dict, self.logger)
  File "task.py", line 61, in __init__
    self.entity_embedding = np.load(config.ENTITY_EMBEDDING)
  File "/home/a017873/.conda/envs/tensorflow/lib/python3.7/site-packages/numpy/lib/npyio.py", line 422, in load
    fid = open(os_fspath(file), "rb")
FileNotFoundError: [Errno 2] No such file or directory: './data/entity.npy'
(tensorflow) a017873@yomite:~/development/relationship_extraction/HRERE$ cd data/

Here the files inside data:

(tensorflow) a017873@yomite:~/development/relationship_extraction/HRERE/data$ ls
entity1.npy    entity2.npy          grouped_test.pkl   prepare_data.py  relation2id.txt  test.tsv  train.tsv  triples.csv
entity2id.txt  glove.840B.300d.txt  grouped_train.pkl  relation1.npy    relation2.npy    test.txt  train.txt

Thank you in advance
Luca

<file_prefix>

python eval.py --model <model_name> --prefix <file_prefix> --runs <number_of_runs>
Can you give me an example of <file_prefix>

Thank you!

Model not saved ...

Hi there,

Thanks for the code. It would have been much nicer if you would have also included the code for saving the trained model (e.g. while running eval.py ) and than reloading the model to run prediction.
Moreover, with the current code if I run the eval.py, ComplexHRERE::evaluate(..) is called, and it is not even checked if the current model state has the best score on validation set :/

PR-curve data points of your model

Could you be so kind to offer your PR-curve data points of you modle, so that successors can compare their new models with yours more easily ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.