(exps: list, exps_dir: str)
| 401 | |
| 402 | |
| 403 | def write_experiments(exps: list, exps_dir: str): |
| 404 | exp_paths = [] |
| 405 | for exp in exps: |
| 406 | exp_name = exp['name'] |
| 407 | # write the expr config to a json file |
| 408 | exp_path = os.path.join(exps_dir, f'{exp_name}.json') |
| 409 | with open(exp_path, 'w') as fd: |
| 410 | |
| 411 | json.dump(exp, fd) |
| 412 | exp_paths.append(exp_path) |
| 413 | return exp_paths |
| 414 | |
| 415 | |
| 416 | def memory_to_string(n, postfix="", units=None, precision=2): |