experiments = {k: common["test_%s" % k] for k in
["client_batch_size", "max_batch_size", "max_seq_len", "num_client", "pooling_layer"]}
fp = open("benchmark-%d%s.result" % (common["num_worker"], "-fp16" if common["fp16"] else ""), "w")
for var_name, var_lst in experiments.items():
// set common args
for k, v in common.items():
After Change
// set default value
for v in experiments:
setattr(cargs, v, vars(args)["default_%s" % v])
exp_vars = vars(args)["test_%s" % exp_name]
avg_speed = []
fp.write("speed wrt. %s\n" % exp_name)
for cvar in exp_vars: