class_docstr: Manages a TensorFlow estimator for training.
class_docstr_tok: ["Manages","a","TensorFlow","estimator","for","training","."]
docstr: Initializes the runner.
  Args:
      model_creator (dict -> Model): see tf_trainer.py.
      data_creator (dict -> tf.Dataset, tf.Dataset): see tf_trainer.py.
      config (dict): see tf_trainer.py.
      verbose (bool): Outputs training data if true.
docstr_tok: ["Initializes","the","runner",".","Args",":","model_creator","(","dict","-",">","Model",")",":","see","tf_trainer.py",".","data_creator","(","dict","-",">","tf.Dataset",",","tf.Dataset",")",":","see","tf_trainer.py",".","config","(","dict",")",":","see","tf_trainer.py",".","verbose","(","bool",")",":","Outputs","training","data","if","true","."]
code: def __init__(
      self,
      model_fn: Callable,
      model_dir: Optional[str] = None,
      config: Optional[Dict[str, Any]] = None,
      params: Optional[Dict[str, Any]] = None,
      warm_start_from: Optional[str] = None,
  ) -> None:
      """Initializes the runner.
      Args:
          model_creator (dict -> Model): see tf_trainer.py.
          data_creator (dict -> tf.Dataset, tf.Dataset): see tf_trainer.py.
          config (dict): see tf_trainer.py.
          verbose (bool): Outputs training data if true.
      """
      import tensorflow.compat.v1 as tf
  
      tf.logging.set_verbosity(tf.logging.INFO)
  
      self.model_fn = model_fn
      tf.gfile.MakeDirs(model_dir)
      self.model_dir = model_dir
      self.config = {} if config is None else config
      self.inter_op_parallelism = self.config.pop(
          "inter_op_parallelism", 1
      )
      self.intra_op_parallelism = self.config.pop(
          "intra_op_parallelism", 1
      )
      self.params = params
      self.warm_start_from = warm_start_from
  
file_path: BigDL/python/orca/src/bigdl/orca/learn/tf/tf_runner.py
imports: from contextlib import closing
  import json
  import logging
  import os
  import socket
  import ray
  from bigdl.dllib.utils.log4Error import invalidInputError
  from typing import TYPE_CHECKING, Any
label_desc: Use image node_id 1 to create a new TFRunner object  with example: obj = TFRunner(model_fn, model_dir, config, params, warm_start_from)