code: def evaluation_log_hook(
      estimator,
      logger,
      true_df,
      y_col,
      eval_df,
      every_n_iter=10000,
      model_dir=None,
      batch_size=256,
      eval_fns=None,
      **eval_kwargs,
  ):
      """Evaluation log hook for TensorFlow high-level API Estimator.
  
      .. note::
         TensorFlow Estimator model uses the last checkpoint weights for evaluation or prediction.
         In order to get the most up-to-date evaluation results while training,
         set model's `save_checkpoints_steps` to be equal or greater than hook's `every_n_iter`.
  
      Args:
          estimator (tf.estimator.Estimator): Model to evaluate.
          logger (Logger): Custom logger to log the results.
              E.g., define a subclass of Logger for AzureML logging.
          true_df (pd.DataFrame): Ground-truth data.
          y_col (str): Label column name in true_df
          eval_df (pd.DataFrame): Evaluation data without label column.
          every_n_iter (int): Evaluation frequency (steps).
          model_dir (str): Model directory to save the summaries to. If None, does not record.
          batch_size (int): Number of samples fed into the model at a time.
              Note, the batch size doesn't affect on evaluation results.
          eval_fns (iterable of functions): List of evaluation functions that have signature of
              (true_df, prediction_df, **eval_kwargs)->(float). If None, loss is calculated on true_df.
          eval_kwargs: Evaluation function's keyword arguments.
              Note, prediction column name should be 'prediction'
  
      Returns:
          tf.train.SessionRunHook: Session run hook to evaluate the model while training.
      """
  
      return _TrainLogHook(
          estimator,
          logger,
          true_df,
          y_col,
          eval_df,
          every_n_iter,
          model_dir,
          batch_size,
          eval_fns,
          **eval_kwargs,
      )
  
imports: import itertools
  import numpy
  import tensorflow
  from tensorflow_estimator.python.estimator.export.export import build_supervised_input_receiver_fn_from_input_fn
label_desc: Use image node_id 6 for calling a global function with example usage: evaluation_log_hook(estimator, logger, true_df, y_col, eval_df, every_n_iter, model_dir, batch_size, eval_fns) and returns: _TrainLogHook