def METHOD_NAME():
    args = config.parse_args()
    configs = config.get_config(
        args.config, overrides=args.override, show=False)
    base_config_file = configs["base_config_file"]
    distill_config_file = configs.get("distill_config_file", None)
    model_name = config.get_config(base_config_file)["Arch"]["name"]
    gpus = configs["gpus"]
    gpus = ",".join([str(i) for i in gpus])
    base_program = [
        "python3.7", "-m", "paddle.distributed.launch",
        "--gpus={}".format(gpus), "tools/train.py", "-c", base_config_file
    ]
    base_output_dir = configs["output_dir"]
    search_times = configs["search_times"]
    search_dict = configs.get("search_dict")
    all_results = {}
    for search_i in search_dict:
        search_key = search_i["search_key"]
        search_values = search_i["search_values"]
        replace_config = search_i["replace_config"]
        res = search_train(search_values, base_program, base_output_dir,
                           search_key, replace_config, model_name,
                           search_times)
        all_results[search_key] = res
        best = res.get("best")
        for v in replace_config:
            base_program += ["-o", "{}={}".format(v, best)]
    teacher_configs = configs.get("teacher", None)
    if teacher_configs is None:
        print(all_results, base_program)
        return
    algo = teacher_configs.get("algorithm", "skl-ugi")
    supported_list = ["skl-ugi", "udml"]
    assert algo in supported_list, f"algorithm must be in {supported_list} but got {algo}"
    if algo == "skl-ugi":
        teacher_program = base_program.copy()
        # remove incompatible keys
        teacher_rm_keys = teacher_configs["rm_keys"]
        rm_indices = []
        for rm_k in teacher_rm_keys:
            for ind, ki in enumerate(base_program):
                if rm_k in ki:
                    rm_indices.append(ind)
        for rm_index in rm_indices[::-1]:
            teacher_program.pop(rm_index)
            teacher_program.pop(rm_index - 1)
        replace_config = ["Arch.name"]
        teacher_list = teacher_configs["search_values"]
        res = search_train(teacher_list, teacher_program, base_output_dir,
                           "teacher", replace_config, model_name)
        all_results["teacher"] = res
        best = res.get("best")
        t_pretrained = "{}/{}_{}_0/{}/best_model".format(base_output_dir,
                                                         "teacher", best, best)
        base_program += [
            "-o", "Arch.models.0.Teacher.name={}".format(best), "-o",
            "Arch.models.0.Teacher.pretrained={}".format(t_pretrained)
        ]
    elif algo == "udml":
        if "lr_mult_list" in all_results:
            base_program += [
                "-o", "Arch.models.0.Teacher.lr_mult_list={}".format(
                    all_results["lr_mult_list"]["best"])
            ]
    output_dir = "{}/search_res".format(base_output_dir)
    base_program += ["-o", "Global.output_dir={}".format(output_dir)]
    final_replace = configs.get('final_replace')
    for i in range(len(base_program)):
        base_program[i] = base_program[i].replace(base_config_file,
                                                  distill_config_file)
        for k in final_replace:
            v = final_replace[k]
            base_program[i] = base_program[i].replace(k, v)
    process = subprocess.Popen(base_program)
    process.communicate()
    print(all_results, base_program)