-
Notifications
You must be signed in to change notification settings - Fork 91
Description
A test set is created whenever "train" is included as an op and test_holdout is specified in the config file. A test set should only be used and kept in memory when "evaluate" is listed as an op in the config file, as the test set will only be evaluated by a call to evaluate in TrainModel (which subsequently calls _evaluate_on_data(self._test_data)). Unfortunately, this test set is kept in memory throughout training, regardless of whether the test set is actually used (i.e. irrespective of whether "evaluate" is included as an op in the config file). I believe that it would be optimal to avoid keeping the test set in memory unnecessarily (i.e. delete it if evaluate() is never going to be called). To test the possible improvements that such a change would make, I ran case 2 from the manuscript examples with "train" as the only op specified in the config file. When I set self._test_data = None in TrainModel, it decreased memory usage by about 10 GB.