(exp_dir, out_dir)
| 115 | |
| 116 | |
| 117 | def convert_metadata(exp_dir, out_dir): |
| 118 | # Store the directory name this was converted from (which typically |
| 119 | # would contain the experiment ID), but othewrise copy unchanged. |
| 120 | with open(os.path.join(exp_dir, _METADATA_FILE)) as f: |
| 121 | metadata = json.load(f) |
| 122 | metadata["converted_from"] = os.path.basename(exp_dir) |
| 123 | with open(os.path.join(out_dir, "converted_metadata.json"), mode="w") as f: |
| 124 | json.dump(metadata, f) |
| 125 | |
| 126 | |
| 127 | def convert_scalars(exp_dir, out_dir): |