(exp: Experiment)
| 307 | |
| 308 | @staticmethod |
| 309 | def write_record(exp: Experiment): |
| 310 | target_dir = exp.input_args.save_dir |
| 311 | file = os.path.join(target_dir, exp.name + '.json') |
| 312 | with open(file, 'w', encoding='utf-8') as f: |
| 313 | f.write(json.dumps(exp.to_dict()) + '\n') |
| 314 | |
| 315 | def _poll(self): |
| 316 | while True: |