From ac49e3cb892e0278ea1d52afdc314322000fae27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89tienne=20Simon?= Date: Fri, 24 Jul 2015 10:40:34 -0400 Subject: Fix test only when valid improve --- ext_test.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ext_test.py b/ext_test.py index 092f39c..5bb4520 100644 --- a/ext_test.py +++ b/ext_test.py @@ -55,12 +55,14 @@ class RunOnTest(SimpleExtension): return if output_dvc: + self.best_dvc = dvc dest_outname = 'test-dest-%s-it%09d-cost%.3f.csv' % (self.model_name, iter_no, dvc) dest_outfile = open(os.path.join('output', dest_outname), 'w') dest_outcsv = csv.writer(dest_outfile) dest_outcsv.writerow(["TRIP_ID", "LATITUDE", "LONGITUDE"]) logger.info("Generating output for test set: %s" % dest_outname) if output_tvc: + self.best_tvc = tvc time_outname = 'test-time-%s-it%09d-cost%.3f.csv' % (self.model_name, iter_no, tvc) time_outfile = open(os.path.join('output', time_outname), 'w') time_outcsv = csv.writer(time_outfile) -- cgit v1.2.3