class_docstr: Manages a TensorFlow model for training.
class_docstr_tok: ["Manages","a","TensorFlow","model","for","training","."]
code: def setup_horovod(self):
      import horovod.tensorflow.keras as hvd
  
      hvd.init()
      self.model = self.model_creator(self.config)
      compile_args = self.compile_args_creator(self.config)
      compile_args["optimizer"] = hvd.DistributedOptimizer(
          compile_args["optimizer"]
      )
  
      self.model.compile(**compile_args)
      self.backend = "horovod"
      self.size = hvd.size()
      self.rank = hvd.rank()
      from tensorflow.python.distribute import (
          distribution_strategy_context as ds_context,
      )
  
      self.strategy = ds_context.get_strategy()
  
imports: import logging
  import json
  import os
  import numpy
  import ray
  from contextlib import closing
  import logging
  import socket
  from zoo.orca.data.utils import ray_partitions_get_data_label
label_desc: Use image node_id 4 for calling the TFRunner obj's underlying member method code with example usage: obj.setup_horovod() without return types