class_docstr: Implementation of a ClusterResolver which reads the Sagemaker EnvVars. This is an implementation of cluster resolvers when running in a SageMaker environment to set information about the cluster.
  
  The cluster spec returned will be initialized from the SageMaker
  environment variables.
  Currently this Cluster Resolver only supports Multi-Worker Mirrored Strategy.
  It assumes all nodes in a SageMaker Cluster are workers.
class_docstr_tok: ["Implementation","of","a","ClusterResolver","which","reads","the","Sagemaker","EnvVars",".","This","is","an","implementation","of","cluster","resolvers","when","running","in","a","SageMaker","environment","to","set","information","about","the","cluster",".","The","cluster","spec","returned","will","be","initialized","from","the","SageMaker","environment","variables",".","Currently","this","Cluster","Resolver","only","supports","Multi-Worker","Mirrored","Strategy",".","It","assumes","all","nodes","in","a","SageMaker","Cluster","are","workers","."]
code: def num_accelerators(
      self, task_type=None, task_id=None, config_proto=None
  ):
      task_type = self.task_type if task_type is None else task_type
      task_id = self.task_id if task_id is None else task_id
      return super(SageMakerClusterResolver, self).num_accelerators(
          task_type, task_id, config_proto
      )
  
imports: import json
  import os
  from tensorflow.python.distribute.cluster_resolver.cluster_resolver import ClusterResolver
  from tensorflow.python.training.server_lib import ClusterSpec
label_desc: Use image node_id 9 for calling the SageMakerClusterResolver obj's underlying member method code with example usage: obj.num_accelerators(task_type, task_id, config_proto) and returns: super