MainLoop test
Rewritten from @blazekadam comment below.
General
-
test stream is used only when the respective argument is passed -
profiling
Hooks are called properly
-
events order match the expectation. -
numbers of events correspond to the numbers of batches, epochs etc... -
epoch id and additional hook args match the expectation -
mainloop provides both all stream sources and net outputs to hook.after_batch
(added based on !31 (merged)) -
mainloop provides the epoch_data
object and this is actually shared between hooks
Inputs are properly checked
-
we might introduce option on_inputs_mismatch
with valueserror
,warn
andignore
, then check if errors are raised
With dummy net and dummy stream test if
-
data are loaded to the net (tested in net test) -
outputs are extracted from the net (and passed to the hooks) -
net is modified according to gradient in train stream (tested in net test) -
net is not modified with the test and valid streams (tested in net test)