Permalink
Browse files

Set new_params_event in MLC after getting the cost

When generation_num=1, if the new_params_event is set first then the
learner will try to get the cost when the queue is empty, causing an
exception.
  • Loading branch information...
1 parent 3a46a17 commit 89f1e1afb9d1c637eadda31e430ea9ae078b0b2d @charmasaur charmasaur committed Dec 4, 2016
Showing with 4 additions and 3 deletions.
  1. +4 −3 mloop/controllers.py
View
@@ -714,13 +714,14 @@ def _optimization_routine(self):
super(MachineLearnerController,self)._put_params_and_out_dict(next_params, param_type=self.machine_learner_type)
ml_consec += 1
ml_count += 1
+
+ self.save_archive()
+ self._get_cost_and_in_dict()
+
if ml_count==self.generation_num:
self.new_params_event.set()
ml_count = 0
-
- self.save_archive()
- self._get_cost_and_in_dict()
def _shut_down(self):

0 comments on commit 89f1e1a

Please sign in to comment.