Commit 18044f42 authored by A. Unique TensorFlower's avatar A. Unique TensorFlower
Browse files

Internal change

PiperOrigin-RevId: 472599161
parent 85cc7f43
...@@ -36,6 +36,9 @@ from official.core import exp_factory ...@@ -36,6 +36,9 @@ from official.core import exp_factory
from official.modeling import hyperparams from official.modeling import hyperparams
BEST_CHECKPOINT_NAME = 'best_ckpt'
def get_leaf_nested_dict(d: Dict[str, Any], keys: List[str]) -> Dict[str, Any]: def get_leaf_nested_dict(d: Dict[str, Any], keys: List[str]) -> Dict[str, Any]:
"""Get leaf from a dictionary with arbitrary depth with a list of keys. """Get leaf from a dictionary with arbitrary depth with a list of keys.
...@@ -138,7 +141,7 @@ class BestCheckpointExporter: ...@@ -138,7 +141,7 @@ class BestCheckpointExporter:
checkpoint, checkpoint,
directory=self._export_dir, directory=self._export_dir,
max_to_keep=1, max_to_keep=1,
checkpoint_name='best_ckpt') checkpoint_name=BEST_CHECKPOINT_NAME)
return self._checkpoint_manager return self._checkpoint_manager
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment