Avoid mutating the `hooks` argument when calling evaluation._evaluate_once().
The current logic leads to surprising behavior. For example, if I write: hooks = [MyWonderfulHook()] while True: evaluation._evaluate_once(checkpoint_path, hooks=hooks) The _evaluate_once() function will append a new instance of FinalOpsHook to `hooks` every time it's called, so that the list of hooks will grow longer and longer over time. PiperOrigin-RevId: 166115816
Loading
Please sign in to comment