Look for an existing json under dir (defaults to :meth:`logger.get_logger_dir()`) named "stats.json", and return the loaded list of statistics if found. Returns None otherwise.
(dir=None)
| 307 | |
| 308 | @staticmethod |
| 309 | def load_existing_json(dir=None): |
| 310 | """ |
| 311 | Look for an existing json under dir (defaults to |
| 312 | :meth:`logger.get_logger_dir()`) named "stats.json", |
| 313 | and return the loaded list of statistics if found. Returns None otherwise. |
| 314 | """ |
| 315 | if dir is None: |
| 316 | dir = logger.get_logger_dir() |
| 317 | fname = os.path.join(dir, JSONWriter.FILENAME) |
| 318 | if tf.gfile.Exists(fname): |
| 319 | with open(fname) as f: |
| 320 | stats = json.load(f) |
| 321 | assert isinstance(stats, list), type(stats) |
| 322 | return stats |
| 323 | return None |
| 324 | |
| 325 | @staticmethod |
| 326 | def load_existing_epoch_number(dir=None): |
no test coverage detected