parameters: (self, checkpoint_position)
return_statement: return restore_ops
docstring: Restore this object and its dependencies (may be deferred).
docstring_summary: Restore this object and its dependencies (may be deferred).
docstring_tokens: Restore this object and its dependencies ( may be deferred ) .
function: def _restore_from_checkpoint_position(self, checkpoint_position):
      """Restore this object and its dependencies (may be deferred)."""
      # Attempt a breadth-first traversal, since presumably the user has more
      # control over shorter paths. If we don't have all of the dependencies at
      # this point, the end result is not breadth-first (since other deferred
      # traversals will happen later).
      visit_queue = collections.deque([checkpoint_position])
      restore_ops = []
      tensor_saveables = {}
      python_saveables = []
      while visit_queue:
        current_position = visit_queue.popleft()
        new_restore_ops, new_tensor_saveables, new_python_saveables = (
            current_position.trackable  # pylint: disable=protected-access
            ._single_restoration_from_checkpoint_position(
                checkpoint_position=current_position,
                visit_queue=visit_queue))
        restore_ops.extend(new_restore_ops)
        tensor_saveables.update(new_tensor_saveables)
        python_saveables.extend(new_python_saveables)
      restore_ops.extend(
          current_position.checkpoint.restore_saveables(
              tensor_saveables, python_saveables))
      return restore_ops
function_tokens: def _restore_from_checkpoint_position ( self , checkpoint_position ) : # Attempt a breadth-first traversal, since presumably the user has more # control over shorter paths. If we don't have all of the dependencies at # this point, the end result is not breadth-first (since other deferred # traversals will happen later). visit_queue = collections . deque ( [ checkpoint_position ] ) restore_ops = [ ] tensor_saveables = { } python_saveables = [ ] while visit_queue : current_position = visit_queue . popleft ( ) new_restore_ops , new_tensor_saveables , new_python_saveables = ( current_position . trackable # pylint: disable=protected-access . _single_restoration_from_checkpoint_position ( checkpoint_position = current_position , visit_queue = visit_queue ) ) restore_ops . extend ( new_restore_ops ) tensor_saveables . update ( new_tensor_saveables ) python_saveables . extend ( new_python_saveables ) restore_ops . extend ( current_position . checkpoint . restore_saveables ( tensor_saveables , python_saveables ) ) return restore_ops