basename + '_test_' + str(index_run).zfill(3) + '.predict') save_predictions(os.path.join(predictions_dir, filename_test), Y_test) current_num_models = len(dir_ensemble_list) watch.stop_task('ensemble_iter_' + str(index_run)) time_iter = watch.get_wall_dur('ensemble_iter_' + str(index_run)) used_time = watch.wall_elapsed('ensemble_builder') index_run += 1 return if __name__ == '__main__': seed = int(sys.argv[8]) predictions_dir = sys.argv[1] logger = get_logger(os.path.basename(__file__)) add_file_handler(logger, os.path.join(predictions_dir, 'ensemble.log')) logger.debug("Start script: %s" % __file__) main(predictions_dir=sys.argv[1], basename=sys.argv[2], task_type=sys.argv[3], metric=sys.argv[4], limit=float(sys.argv[5]), output_dir=sys.argv[6], ensemble_size=int(sys.argv[7]), logger=logger) sys.exit(0)
def get_automl_logger(log_dir, basename, seed): logger = get_logger(os.path.basename(__file__)) logger_file = os.path.join(log_dir, '%s.log' % str( 'AutoML_%s_%d' % (basename, seed))) add_file_handler(logger, logger_file) return logger