def base_minimizer(model, data, algo, max_evals, trials, rseed=1337, full_model_string=None):

    if full_model_string is not None:
        model_str = full_model_string
    else:
        model_str = get_hyperopt_model_string(model, data)
    write_temp_files(model_str)

    try:
        from temp_model import keras_fmin_fnct, get_space
    except:
        print("Unexpected error: {}".format(sys.exc_info()[0]))
        raise
    try:
        os.remove('./temp_model.py')
        os.remove('./temp_model.pyc')
    except __HOLE__:
        pass

    best_run = fmin(keras_fmin_fnct,
                    space=get_space(),
                    algo=algo,
                    max_evals=max_evals,
                    trials=trials,
                    rseed=rseed)

    return best_run
dataset/ETHPy150Open maxpumperla/hyperas/hyperas/optim.py/base_minimizer