avg_speed = []
for var in var_lst:
args = {k: v for k, v in common.items()}
args[var_name] = var
args_cmd = ["-%s=%s" % (k, v) for k, v in args.items()]
// override exp args
server = BertServer(arg_p.parse_args(args_cmd))
After Change
for var_name, var_lst in experiments.items():
// set common args
args = namedtuple("args_namedtuple", ",".join(common.keys()))
for k, v in common.items():
setattr(args, k, v)
avg_speed = []
for var in var_lst:
// override exp args
setattr(args, var_name, var)