File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -2285,7 +2285,7 @@ def best_fn(metrics):
22852285 max_to_keep = keep ,
22862286 save_interval_steps = period ,
22872287 keep_period = force_keep_period ,
2288- best_fn = best_fn if metric_name_to_monitor is not None else None ,
2288+ get_metric_fn = best_fn if metric_name_to_monitor is not None else None ,
22892289 best_mode = metric_mode ,
22902290 keep_checkpoints_without_metrics = keep_checkpoints_without_metrics ,
22912291 cleanup_tmp_directories = True ,
Original file line number Diff line number Diff line change @@ -742,10 +742,10 @@ def test_create_orbax_checkpoint_manager(
742742 expected_keep_checkpoints_without_metrics ,
743743 )
744744 if expected_metric is None :
745- self .assertIsNone (manager ._manager ._options .best_fn )
745+ self .assertIsNone (manager ._manager ._options .get_metric_fn )
746746 else :
747747 self .assertEqual (
748- manager ._manager ._options .best_fn (metrics ),
748+ manager ._manager ._options .get_metric_fn (metrics ),
749749 expected_metric ,
750750 )
751751
@@ -812,7 +812,7 @@ def test_create_orbax_checkpoint_manager_from_checkpointer(
812812 self .assertEqual (manager ._manager ._options .best_mode , "max" )
813813 self .assertTrue (manager ._manager ._options .keep_checkpoints_without_metrics )
814814 self .assertEqual (
815- manager ._manager ._options .best_fn (
815+ manager ._manager ._options .get_metric_fn (
816816 {"train/accuracy" : 0.8 , "train/loss" : 0.1 }
817817 ),
818818 0.8 ,
You can’t perform that action at this time.
0 commit comments