class_docstr: AllReduce StrategyBuilder.
  
  This StrategyBuilder generates a strategy that synchronizes every dense variable using AllReduce.
  It will sequentially merge collective ops into a single collective group based on chunk_size.
  
  This strategy does not support synchronizing sparse updates with >1 nodes due to the TF AllGather bug.
class_docstr_tok: ["AllReduce","StrategyBuilder",".","This","StrategyBuilder","generates","a","strategy","that","synchronizes","every","dense","variable","using","AllReduce",".","It","will","sequentially","merge","collective","ops","into","a","single","collective","group","based","on","chunk_size",".","This","strategy","does","not","support","synchronizing","sparse","updates","with",">","1","nodes","due","to","the","TF","AllGather","bug","."]
docstr: Creates a NodeConfig specifying synchronization with AllReduce.
  
  Args:
      var_name (str): The name of the variable.
      group (int): the collective group this synchronizer belongs to.
      algo (str): 'AUTO', 'NCCL', 'RING'.
      compressor (str): Gradient compression algorithm to use.
  
  Returns:
      strategy_pb2.Strategy.Node: the config for the node.
docstr_tok: ["Creates","a","NodeConfig","specifying","synchronization","with","AllReduce",".","Args",":","var_name","(","str",")",":","The","name","of","the","variable",".","group","(","int",")",":","the","collective","group","this","synchronizer","belongs","to",".","algo","(","str",")",":","'AUTO","'",",","'NCCL","'",",","'RING","'",".","compressor","(","str",")",":","Gradient","compression","algorithm","to","use",".","Returns",":","strategy_pb2.Strategy.Node",":","the","config","for","the","node","."]
code: def _gen_all_reduce_node_config(
      var_name,
      group=0,
      all_reduce_spec="NCCL",
      compressor="NoneCompressor",
  ):
      """
      Creates a NodeConfig specifying synchronization with AllReduce.
  
      Args:
          var_name (str): The name of the variable.
          group (int): the collective group this synchronizer belongs to.
          algo (str): 'AUTO', 'NCCL', 'RING'.
          compressor (str): Gradient compression algorithm to use.
  
      Returns:
          strategy_pb2.Strategy.Node: the config for the node.
      """
      node = strategy_pb2.Strategy.Node()
      node.var_name = var_name
      node.AllReduceSynchronizer.spec = (
          synchronizers_pb2.AllReduceSynchronizer.Spec.Value(
              all_reduce_spec
          )
      )
      node.AllReduceSynchronizer.compressor = (
          synchronizers_pb2.AllReduceSynchronizer.Compressor.Value(
              compressor
          )
      )
      node.AllReduceSynchronizer.group = group
      return node
  
imports: from autodist.strategy.base import Strategy, StrategyBuilder
  from autodist.proto import strategy_pb2, synchronizers_pb2
label_desc: Use image node_id 3 for calling the AllReduce obj's underlying member method code with example usage: obj._gen_all_reduce_node_config(var_name, group, all_reduce_spec, compressor) and returns: node