allenai / deep_qa

A deep NLP library, based on Keras / tf, focused on question answering (but useful for other NLP too)
Apache License 2.0
404 stars 133 forks source link

Fix model serialization #195

Closed nelson-liu closed 7 years ago

nelson-liu commented 7 years ago

This PR fixes (or at least tries to fix) model serialization and adds a test to ensure it works with a basic TextTrainer and the AttentionSumReader

nelson-liu commented 7 years ago

There's also a bug still on the loose somewhere with regards to actually saving the best epoch --- sometimes when i run experiments it fails to save the model (complains that it cant find the file), but I haven't tried to reproduce it yet, since it goes away after I run the model again.

nelson-liu commented 7 years ago

i only fixed model serialization for the TrueFalseModel / the ASReader. It's a bit too much for me at the moment to fix all the models, but I don't think it would be hard to do on a case-by-case basis as we need them. Depending on whether this or #187 gets merged first, i'll also fix serialization for the GAReader

nelson-liu commented 7 years ago

@matt-gardner want to take one final look before merging?

nelson-liu commented 7 years ago

done, will merge when CI is green