Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Testing model implementations #318

Open
pminervini opened this issue Oct 29, 2017 · 5 comments
Open

Testing model implementations #318

pminervini opened this issue Oct 29, 2017 · 5 comments

Comments

@pminervini
Copy link
Collaborator

Write unit tests inspired by "How to unit test machine learning code" [1]

[1] https://medium.com/@keeper6928/how-to-unit-test-machine-learning-code-57cf6fd81765

pminervini pushed a commit that referenced this issue Oct 29, 2017
pminervini pushed a commit that referenced this issue Oct 29, 2017
@pminervini
Copy link
Collaborator Author

@dirkweissenborn I would really like to sysematically test our models with the following two functions:

https://github.com/uclmr/jack/blob/master/jack/debug/base.py

One checks whether all layers are updated during training, and the other verifies that the loss is never zero.

How would you proceed for implementing the tests? (The first one seems especially useful)

@dirkweissenborn
Copy link
Collaborator

Sounds like a good idea! I don't really understand though what you mean by implementing the tests? Maybe we need a registry for models with a corresponding default dataset. For those we load a small part of the dataset (or the whole dataset and then just cut the list of QASettings), run the readers train function and compare parameters before and after. That requires you to call setup from data before the train method (otherwise you cannot get the initial parameters), but this is fine, since a flag in train checks whether the reader is already setup.

@pminervini
Copy link
Collaborator Author

pminervini commented Oct 30, 2017

@dirkweissenborn no I mean - I just need the training operator (train_op) and a feed_dict: where could I get those?

Or maybe I can just train in the normal way, and check before and after whether all layers got updated - what do you think ?

@dirkweissenborn
Copy link
Collaborator

dirkweissenborn commented Oct 30, 2017 via email

@riedelcastro
Copy link
Contributor

riedelcastro commented Oct 30, 2017 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants