class_docstr: A strategy that round-robin assigns subgraphs to specific workers.
  
  Specifically, it selects dedicated workers to only train ensemble variables,
  and round-robin assigns subnetworks to dedicated subnetwork-training workers.
  
  Unlike :class:`ReplicationStrategy`, this strategy scales better with the
  number of subnetworks, workers, and parameter servers. For :math:`m` workers,
  :math:`n` parameter servers, and :math:`k` subnetworks, this strategy will
  scale with :math:`O(m/k)` training speedup, :math:`O(m*n/k)` variable fetches
  from parameter servers, and :math:`O(1)` memory required per worker.
  Additionally, there will only be :math:`O(m/k)` stale gradients per subnetwork
  when training with asynchronous SGD, which reduces training instability versus
  :class:`ReplicationStrategy`.
  
  When there are more workers than subnetworks, this strategy assigns
  subnetworks to workers modulo the number of subnetworks.
  
  Conversely, when there are more subnetworks than workers, this round robin
  assigns subnetworks modulo the number of workers. So certain workers may end
  up training more than one subnetwork.
  
  This strategy gracefully handles scenarios when the number of subnetworks
  does not perfectly divide the number of workers and vice-versa. It also
  supports different numbers of subnetworks at different iterations, and
  reloading training with a resized cluster.
  
  Args:
    drop_remainder: Bool whether to drop remaining subnetworks that haven't been
      assigned to a worker in the remainder after perfect division of workers by
      the current iteration's num_subnetworks + 1. When :code:`True`, each subnetwork
      worker will only train a single subnetwork, and subnetworks that have not
      been assigned to assigned to a worker are dropped. NOTE: This can result
      in subnetworks not being assigned to any worker when
      num_workers < num_subnetworks + 1. When :code:`False`, remaining subnetworks
      during the round-robin assignment will be placed on workers that already
      have a subnetwork.
  
  Returns:
    A :class:`RoundRobinStrategy` instance for the current cluster.
class_docstr_tok: ["A","strategy","that","round-robin","assigns","subgraphs","to","specific","workers",".","Specifically",",","it","selects","dedicated","workers","to","only","train","ensemble","variables",",","and","round-robin","assigns","subnetworks","to","dedicated","subnetwork-training","workers",".","Unlike",":","class",":","`","ReplicationStrategy","`",",","this","strategy","scales","better","with","the","number","of","subnetworks",",","workers",",","and","parameter","servers",".","For",":","math",":","`","m","`","workers",",",":","math",":","`","n","`","parameter","servers",",","and",":","math",":","`","k","`","subnetworks",",","this","strategy","will","scale","with",":","math",":","`","O","(","m\/k",")","`","training","speedup",",",":","math",":","`","O","(","m","*","n\/k",")","`","variable","fetches","from","parameter","servers",",","and",":","math",":","`","O","(","1",")","`","memory","required","per","worker",".","Additionally",",","there","will","only","be",":","math",":","`","O","(","m\/k",")","`","stale","gradients","per","subnetwork","when","training","with","asynchronous","SGD",",","which","reduces","training","instability","versus",":","class",":","`","ReplicationStrategy","`",".","When","there","are","more","workers","than","subnetworks",",","this","strategy","assigns","subnetworks","to","workers","modulo","the","number","of","subnetworks",".","Conversely",",","when","there","are","more","subnetworks","than","workers",",","this","round","robin","assigns","subnetworks","modulo","the","number","of","workers",".","So","certain","workers","may","end","up","training","more","than","one","subnetwork",".","This","strategy","gracefully","handles","scenarios","when","the","number","of","subnetworks","does","not","perfectly","divide","the","number","of","workers","and","vice-versa",".","It","also","supports","different","numbers","of","subnetworks","at","different","iterations",",","and","reloading","training","with","a","resized","cluster",".","Args",":","drop_remainder",":","Bool","whether","to","drop","remaining","subnetworks","that","have","n't","been","assigned","to","a","worker","in","the","remainder","after","perfect","division","of","workers","by","the","current","iteration","'s","num_subnetworks","+","1",".","When",":","code",":","`","True","`",",","each","subnetwork","worker","will","only","train","a","single","subnetwork",",","and","subnetworks","that","have","not","been","assigned","to","assigned","to","a","worker","are","dropped",".","NOTE",":","This","can","result","in","subnetworks","not","being","assigned","to","any","worker","when","num_workers","<","num_subnetworks","+","1",".","When",":","code",":","`","False","`",",","remaining","subnetworks","during","the","round-robin","assignment","will","be","placed","on","workers","that","already","have","a","subnetwork",".","Returns",":","A",":","class",":","`","RoundRobinStrategy","`","instance","for","the","current","cluster","."]
code: def should_train_subnetworks(self, num_subnetworks):
      if num_subnetworks == 1 or self._num_workers == 1:
          return True
      return not self.should_build_ensemble(num_subnetworks)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import abc
  import contextlib
  from absl import logging
  from adanet import tf_compat
  from adanet.distributed.devices import _OpNameHashStrategy
  import numpy
  import six
label_desc: Use image node_id 7 for calling the RoundRobinStrategy obj's underlying member method code with example usage: obj.should_train_subnetworks(num_subnetworks) and returns: unknown, True