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
Loading
Please sign in to comment