(save_path)
| 181 | |
| 182 | def test_monitored_session_restore(self): |
| 183 | def save_restore_fn(save_path): |
| 184 | with ops.Graph().as_default(): |
| 185 | server = server_lib.Server.create_local_server() |
| 186 | with ops.device('/cpu:0'): |
| 187 | training_util.get_or_create_global_step() |
| 188 | work_queue = WorkQueue( |
| 189 | [b"fast", b"fox", b"jumps", b"over", b"lazy", b"dog"], |
| 190 | num_epochs=3, shuffle=False, name='wq_save_restore') |
| 191 | local_queue = work_queue.input_producer() |
| 192 | dequeue = local_queue.dequeue() |
| 193 | with monitored_session.MonitoredTrainingSession( |
| 194 | master=server.target, |
| 195 | checkpoint_dir=save_path) as sess: |
| 196 | sess.run(dequeue) |
| 197 | save_path = self.get_temp_dir() |
| 198 | save_proc = Process(target=save_restore_fn, args=(save_path,)) |
| 199 | save_proc.start() |
nothing calls this directly
no test coverage detected