make services.cleanup happen automatically (#224)

This commit is contained in:
Robert Nishihara
2016-07-07 14:05:25 -07:00
committed by Philipp Moritz
parent 63f7548763
commit 8e6b7929d6
5 changed files with 68 additions and 24 deletions
-1
View File
@@ -36,4 +36,3 @@ for i in range(samples):
print "Best parameters are now {}.".format(params)
print "Best parameters over {} samples was {}, with an accuracy of {:.4}%.".format(samples, best_params, 100 * best_accuracy)
services.cleanup()
-2
View File
@@ -34,5 +34,3 @@ if __name__ == "__main__":
if args.drop_ipython:
import IPython
IPython.embed()
services.cleanup()
-2
View File
@@ -50,5 +50,3 @@ if __name__ == "__main__":
result = scipy.optimize.fmin_l_bfgs_b(full_loss, theta_init, maxiter=10, fprime=full_grad, disp=True)
end_time = time.time()
print "Elapsed time = {}".format(end_time - start_time)
services.cleanup()