class_docstr: Proxy variable implementation.
class_docstr_tok: ["Proxy","variable","implementation","."]
docstr: Update all proxy variable consumers.
docstr_tok: ["Update","all","proxy","variable","consumers","."]
code: def _update_all_consumers(self):
      """Update all proxy variable consumers."""
      for consumer_op in self._consumer_to_read_var_op:
          if consumer_op in self._proxy_var_init_ops:
              continue
          if consumer_op.name.startswith(AUTODIST_REPLICA_PREFIX):
              if len(self._proxy_vars) > 1:
                  raise ValueError(
                      "Now we only create one proxy per variable at most..."
                  )
              self._update_consumer(self._proxy_vars[0], consumer_op)
          else:
              # TODO: Attention: ReadVarOp consumers include the "save".
              logging.warning(
                  "Consumer %s of value of variable %s is a shared node, do not change to proxy variable"
                  % (consumer_op.name, self._this_op.name)
              )
  
file_path: autodist/autodist/kernel/common/proxy_variable.py
imports: from collections import defaultdict
  from tensorflow.core.framework.attr_value_pb2 import AttrValue
  from tensorflow.python import ops
  from tensorflow.python.ops import variable_scope
  from tensorflow.python.util.compat import as_bytes
  from autodist.const import COLOCATION_PREFIX
  from autodist.kernel.common.utils import get_consumers, update_consumers, replica_prefix, AUTODIST_REPLICA_PREFIX, parse_optimizer_scope
  from autodist.kernel.common.variable_utils import get_read_var_ops, get_read_var_tensor, gen_read_var_op
  from autodist.utils import logging
label_desc: Use image node_id 8 for calling the ProxyVariable obj's underlying member method code with example usage: obj._update_all_consumers() without return types