Wikidata / soweego

Link Wikidata items to large catalogs
https://meta.wikimedia.org/wiki/Grants:Project/Hjfocs/soweego_2
GNU General Public License v3.0
97 stars 9 forks source link

Switch to tensorflow.keras is blocked #386

Open marfox opened 4 years ago

marfox commented 4 years ago

According to https://keras.io/ , the:

2.3.0 release will be the last major release of multi-backend Keras. Multi-backend Keras is superseded by tf.keras.

We need to switch to tf.keras to keep the project fresh.

However, it seems we're hitting an open tensorflow issue, see efd8f62ad9ff5432ae66a514c27c5cc6fcdc7433. As a temporary solution, I've kept the keras dependency.

In a nutshell:

I see 2 workarounds that entail persistence with the h5 format and require some work:

  1. save the model with OUR_OBJECT.classifier.model.save and load it back with tensorflow.keras.models.load_model , see https://www.tensorflow.org/guide/keras/save_and_serialize#whole-model_saving. The problem here is that we lose our wrapper;
  2. (probably not worth) investigate h5py to persist our Python objects.