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