Commit 079b6494 authored by A. Unique TensorFlower's avatar A. Unique TensorFlower Committed by TensorFlower Gardener
Browse files

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
parent 03154ba8
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment