uclnlp / jack

Jack the Reader
MIT License
258 stars 82 forks source link

Bug in ClassificationEvalHook #365

Closed pminervini closed 6 years ago

pminervini commented 6 years ago
$ python3 ./bin/jack-train.py with config=tests/test_conf/dam_test.yaml 2>&1 | tail -n 20
INFO - jack.util.hooks - Epoch 4    Iter 100    Examples/s 26830.56
INFO - jack.util.hooks - Started evaluation ClassificationEvalHook
 [Elapsed Time: 0:00:00] |###################################| (Time: 0:00:00) 
INFO - jack.util.hooks - Epoch 4    Iter 128    total 1000  Accuracy: 0.453 F1_macro: 0.370 ClassificationEvalHook
INFO - jack.train_reader - Saving reader_type to: ./tests/test_results/dam_reader_test
INFO - jack.util.hooks - Started evaluation ClassificationEvalHook
 [Elapsed Time: 0:00:00] |###################################| (Time: 0:00:00) 
INFO - jack.util.hooks - Epoch 5    Iter 160    total 1000  Accuracy: 0.452 F1_macro: 0.386 ClassificationEvalHook
INFO - jack.train_reader - Decayed learning rate to: 0.00100
INFO:tensorflow:Restoring parameters from ./tests/test_results/dam_reader_test/model_module
INFO - tensorflow - Restoring parameters from ./tests/test_results/dam_reader_test/model_module
ERROR - jack - Failed after 0:00:19!
Traceback (most recent calls WITHOUT Sacred internals):
  File "./bin/jack-train.py", line 143, in main
    jtrain(jtreader, train_data, test_data, dev_data, parsed_config, debug=debug)
  File "/home/pasquale/.pyenv/versions/3.6.3/lib/python3.6/site-packages/jack-0.1.0-py3.6.egg/jack/train_reader.py", line 18, in train
    train_tensorflow(reader, train_data, test_data, dev_data, configuration, debug)
  File "/home/pasquale/.pyenv/versions/3.6.3/lib/python3.6/site-packages/jack-0.1.0-py3.6.egg/jack/train_reader.py", line 114, in train_tensorflow
    test_eval_hook.at_test_time(1)
AttributeError: 'ClassificationEvalHook' object has no attribute 'at_test_time'