2 ms·
Testing model code tends to be very difficult unless you design your training loop with lots of abstractions and dependency injection which makes the code less
by tadeegan 6y ago
Testing model code tends to be very difficult unless you design your training loop with lots of abstractions and dependency injection which makes the code less explicit and difficult to understand. For example, try to look at the Tensorflow Estimator framework. Absolutely awful to use but is well tested.
- qayxc 6y agoThe idea is not to test model code at all - the blog post explicitly mentions that this as an anti-pattern. The tests aren't concerned with the technical details at all - they should test whether the models work, not how.
- frag 6y agoExactly. The tests are concerned with integrating the ML component into the broader picture of requirements and engineering. Engineers are not really interested in why the statistics of a model is failing. And should never be (that's why testing model internals in TFML is an anti-pattern)