wellcometrust / deep_reference_parser

A deep learning model for extracting references from text
MIT License
24 stars 1 forks source link

Pinning keras and tensorflow versions in setup #39

Closed lizgzil closed 4 years ago

lizgzil commented 4 years ago

The new Keras version 2.4.0 released in June 2020 made changes that broke the deep reference parser.

 File "/usr/local/lib/python3.6/site-packages/deep_reference_parser/deep_reference_parser.py", line 989, in load_weights
    saving.load_weights_from_hdf5_group(

AttributeError: module 'keras.engine.saving' has no attribute 'load_weights_from_hdf5_group'

Thus I've pinned the version of keras to 2.2.5 (which is whats in the requirements). I also needed to pin the version of keras-contrib since it overwrote keras 2.2.5 to the newer version. Then I got issues with tensorflow, so also pinned this to the version in the requirements.

codecov-commenter commented 4 years ago

Codecov Report

Merging #39 into master will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #39   +/-   ##
=======================================
  Coverage   81.46%   81.46%           
=======================================
  Files          17       17           
  Lines        1338     1338           
=======================================
  Hits         1090     1090           
  Misses        248      248           

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 85949cb...51b5912. Read the comment docs.

ivyleavedtoadflax commented 4 years ago

Makes sense @lizgzil :+1: Long term i think it would be worth moving to tf.keras with tf 2.0, what prevented me in the past was that CRFs were not implemented, but it looks like they have been added now: https://github.com/tensorflow/addons/pull/1999

ivyleavedtoadflax commented 4 years ago

Also referenced here: https://github.com/wellcometrust/deep_reference_parser/issues/28