Commit 13625acb authored by A. Unique TensorFlower's avatar A. Unique TensorFlower Committed by TensorFlower Gardener
Browse files

Adds a ready_for_local_init_op to SessionManager and Supervisor.

The ready_for_local_init_op checks if a model is ready to run local_init_op;
ready_for_local_init_op is always checked before local_init_op is run.

Failure to pass ready_for_local_init_op results in different behaviors:
1. In prepare_session, a RuntimeError is raised, since the model cannot be made
ready.
2. In recover_session, the `initialized` flag is returned as False, to indicate
that the checkpoint recovery failed to make the model ready to run
local_init_op. (If recover_session was called from prepare_session, the
initialization process defaults back to using init_op and init_fn, i.e., it
creates a fresh session.)
3. In wait_for_session, only by passing ready_for_local_init_op (and also
ready_op) is a session returned. Otherwise, failing ready_for_local_init_op
causes wai_for_session to continue to wait for the model to be made into a
ready state to run local_init_op.
Change: 130189227
parent 801f9206
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment