docstr: Evaluate callback, calculate precision, recall and f1
  Args:
      kash_model: the kashgari task model to evaluate
      x_data: feature data for evaluation
      y_data: label data for evaluation
      step: step, default 5
      truncating: truncating: remove values from sequences larger than `model.embedding.sequence_length`
      batch_size: batch size, default 256
docstr_tok: ["Evaluate","callback",",","calculate","precision",",","recall","and","f1","Args",":","kash_model",":","the","kashgari","task","model","to","evaluate","x_data",":","feature","data","for","evaluation","y_data",":","label","data","for","evaluation","step",":","step",",","default","5","truncating",":","truncating",":","remove","values","from","sequences","larger","than","`","model.embedding.sequence_length","`","batch_size",":","batch","size",",","default","256"]
code: def __init__(
      self,
      kash_model: ABCTaskModel,
      x_data: List[Any],
      y_data: List[Any],
      *,
      step: int = 5,
      truncating: bool = False,
      batch_size: int = 256,
  ) -> None:
      """
      Evaluate callback, calculate precision, recall and f1
      Args:
          kash_model: the kashgari task model to evaluate
          x_data: feature data for evaluation
          y_data: label data for evaluation
          step: step, default 5
          truncating: truncating: remove values from sequences larger than `model.embedding.sequence_length`
          batch_size: batch size, default 256
      """
      super(EvalCallBack, self).__init__()
      self.kash_model: ABCTaskModel = kash_model
      self.x_data = x_data
      self.y_data = y_data
      self.step = step
      self.truncating = truncating
      self.batch_size = batch_size
      self.logs: List[Dict] = []
  
file_path: Kashgari/kashgari/callbacks/eval_callBack.py
imports: from typing import List, Any, Dict
  import tensorflow
  from tensorflow import keras
  from kashgari.tasks.abs_task_model import ABCTaskModel
label_desc: Use image node_id 1 to create a new EvalCallBack object from inherited base classes: keras.callbacks with example: obj = EvalCallBack(kash_model, x_data, y_data)