def get_output_path()

in src/alpaca_eval/utils.py [0:0]


def get_output_path(output_path, model_outputs, name, dflt_dir="results"):
    if output_path == "auto":
        if model_outputs is None:
            output_path = None
        else:
            try:
                if Path(model_outputs).exists():
                    output_path = Path(model_outputs).parent
            except:
                pass

            if output_path == "auto":
                if name is not None:
                    output_path = Path(dflt_dir) / name
                else:
                    output_path = "."
    if output_path is not None:
        output_path = Path(output_path)
        output_path.mkdir(exist_ok=True, parents=True)
    return output_path