class_docstr: Manages a TensorFlow model for training.
docstr: Returns the state of the runner.
docstr_tok: ["Returns","the","state","of","the","runner","."]
code: def get_state(self):
      """Returns the state of the runner."""
      invalidInputError(
          hasattr(self, "model"),
          "The model has not yet been created. "
          "Please input a model_creator when creating estimator "
          "or use load function of the estimator to load a model.",
      )
      return {
          "weights": self.model.get_weights(),
          "optimizer_weights": self.model.optimizer.get_weights()
          if hasattr(self.model.optimizer, "get_weights")
          else [
              var.numpy() for var in self.model.optimizer.variables()
          ],  # type:ignore
      }
  
imports: import json
  import os
  import socket
  import shutil
  import tempfile
  import copy
  import ray
  from contextlib import closing
  from bigdl.dllib.utils import log4Error
  from bigdl.orca.data.utils import partitions_get_data_label, partitions_get_tf_dataset
  from bigdl.orca.data.file import is_file, get_remote_file_to_local, get_remote_dir_to_local, get_remote_files_with_prefix_to_local, put_local_file_to_remote, put_local_dir_tree_to_remote, put_local_files_with_prefix_to_remote
  from bigdl.orca.learn.utils import process_tensorboard_in_callbacks
  from bigdl.dllib.utils.log4Error import *
label_desc: Use image node_id 9 for calling the TFRunner obj's underlying member method code with example usage: obj.get_state() and returns: dict