in get_training_params.py [0:0]
def unstructured_args_dict(args):
ua_dict = gen_args_dict(args)
if args.topk is not None:
ua_dict["topk"] = args.topk
if args.warmup_budget is not None:
ua_dict["warmup_budget"] = args.warmup_budget
if args.eval_topk_grid is not None:
if args.method == "lcs_l":
ua_dict["alpha_grid"] = args.eval_topk_grid
else:
ua_dict["eval_param_grid"] = args.eval_topk_grid
if (
args.topk_lower_bound is not None
and args.topk_upper_bound is not None
and args.eval_topk_grid is not None
):
if args.method == "lcs_l":
ua_dict["alpha_grid"] = args.eval_topk_grid
elif args.method == "lcs_p":
ua_dict["eval_param_grid"] = args.eval_topk_grid
ua_dict["alpha_sampling"] = [
args.topk_lower_bound,
args.topk_upper_bound,
0.5,
]
return ua_dict