Пример #1
0
    def find_best_model(self):
        closest_model = find_model(self.opt_model, self.models)
        logger.info(str(closest_model))

        if os.path.exists(self.path_to_most_suitable_model):
            logger.info('overwriting model.txt . . .')
            os.remove(self.path_to_most_suitable_model)
        with open(self.path_to_most_suitable_model, "w") as f:
            f.write(closest_model)
        self.update_optimal_model()
Пример #2
0
    def find_best_model(self):
        closest_model = find_model(self.opt_model, self.models)
        print('closest model to your preferences is: ', closest_model)

        if os.path.exists(self.path_to_most_suitable_model):
            print('overwriting model.txt . . .')
            os.remove(self.path_to_most_suitable_model)
        with open(self.path_to_most_suitable_model, "w") as f:
            f.write(closest_model)
        self.update_optimal_model()