(save_path)
| 245 | # pylint: disable=not-callable |
| 246 | incompatible_saver.save(sess, os.path.join(save_path, 'test_nockpt')) |
| 247 | def restore_fn(save_path): |
| 248 | server = server_lib.Server.create_local_server() |
| 249 | with ops.Graph().as_default(): |
| 250 | with ops.device('/cpu:0'): |
| 251 | training_util.get_or_create_global_step() |
| 252 | work_queue = WorkQueue( |
| 253 | [b"fast", b"fox", b"jumps", b"over", b"lazy", b"dog"], |
| 254 | num_epochs=3, name='wq_restore_nothing') |
| 255 | local_queue = work_queue.input_producer() |
| 256 | dequeue = local_queue.dequeue() |
| 257 | default_saver = saver.Saver( |
| 258 | builder=PartialRestoreSaverBuilder(checkpoint_dir=save_path)) |
| 259 | ops.add_to_collection(ops.GraphKeys.SAVERS, default_saver) |
| 260 | with monitored_session.MonitoredTrainingSession( |
| 261 | master=server.target, |
| 262 | checkpoint_dir=save_path) as sess: |
| 263 | sess.run(dequeue) |
| 264 | logging.info('work queue restored at {}'.format(save_path)) |
| 265 | restore_proc = Process(target=restore_fn, args=(save_path,)) |
| 266 | restore_proc.start() |
| 267 | restore_proc.join() |
nothing calls this directly
no test coverage detected