def stop(self): if self.is_slave: return self.info("Best fitness: %s", self.best.fitness) self.info("Best snapshot: %s", self.best.snapshot) self.info("Best configuration") print_config(self.best.config)
def stop(self): if self.is_slave: return self.info("Best fitness: %s", self.best.fitness) self.info("Best snapshot: %s", self.best.snapshot) self.info("Best configuration") print_config(self.best.config) path_to_the_best_config = "%s_best_config.py" % self._model_.__name__ with open(path_to_the_best_config, "w") as fout: fout.write("from veles.config import root\n\n\nroot.update(%s)" % fix_contents(self.best.config)) self.info("Best configuration was saved to %s" % path_to_the_best_config)
def stop(self): if self.is_slave: return self.info("Best fitness: %s", self.best.fitness) self.info("Best snapshot: %s", self.best.snapshot) self.info("Best configuration") print_config(self.best.config) path_to_the_best_config = "%s_best_config.py" % self._model_.__name__ with open(path_to_the_best_config, "w") as fout: fout.write( "from veles.config import root\n\n\nroot.update(%s)" % fix_contents(self.best.config)) self.info( "Best configuration was saved to %s" % path_to_the_best_config)