code: def test_estimator_graph_dataframe_exception(self):
      tf.reset_default_graph()
  
      model = SimpleModel()
      file_path = os.path.join(resource_path, "orca/learn/ncf.csv")
      sc = init_nncontext()
      sqlcontext = SQLContext(sc)
      df = sqlcontext.read.csv(file_path, header=True, inferSchema=True)
  
      est = Estimator.from_graph(
          inputs=[model.user, model.item],
          labels=[model.label],
          outputs=[model.logits],
          loss=model.loss,
          optimizer=tf.train.AdamOptimizer(),
          metrics={"loss": model.loss},
      )
  
      with self.assertRaises(Exception) as context:
          est.fit(
              data=df,
              batch_size=8,
              epochs=10,
              feature_cols=["user", "item"],
              validation_data=df,
          )
      self.assertTrue(
          "label columns is None; it should not be None in training"
          in str(context.exception)
      )
  
      est.fit(
          data=df,
          batch_size=8,
          epochs=10,
          feature_cols=["user", "item"],
          label_cols=["label"],
      )
      with self.assertRaises(Exception) as context:
          predictions = est.predict(df, batch_size=4).collect()
      self.assertTrue(
          "feature columns is None; it should not be None in prediction"
          in str(context.exception)
      )
  
      with self.assertRaises(Exception) as context:
          est.fit(
              data=df,
              batch_size=8,
              epochs=10,
              feature_cols=["user", "item"],
              label_cols=["label"],
              validation_data=[1, 2, 3],
          )
      self.assertTrue(
          "train data and validation data should be both Spark DataFrame"
          in str(context.exception)
      )
  
imports: import os
  import shutil
  import tempfile
  from unittest import TestCase
  import numpy
  import tensorflow
  from zoo.orca.learn.trigger import SeveralIteration
  from pyspark.sql.context import SQLContext
  import zoo.orca.data.pandas
  from zoo import init_nncontext
  from zoo.orca import OrcaContext
  from zoo.orca.data.tf.data import Dataset
  from zoo.orca.learn.tf.estimator import Estimator
  from zoo.util.tf import save_tf_checkpoint, load_tf_checkpoint, get_checkpoint_state
label_desc: Use image node_id 12 for calling the TestEstimatorForGraph obj's underlying member method code with example usage: obj.test_estimator_graph_dataframe_exception() without return types