code: def eval_subject(
      self,
      subject_name,
      test_df,
      eval_type="validation",  # "test","validation"
  ):
      if eval_type == "validation":
          responses = []
          result = []
          score = []
          for _, row in tqdm(test_df.iterrows(), total=len(test_df)):
              question = self.format_example(row)
  
              response, _ = self.model.chat(
                  self.tokenizer,
                  question,
                  history=None,
              )
              pred = self.extract_answer(response, row)
              if "answer" in row:
                  correct = 1 if pred == row["answer"] else 0
                  score.append(correct)
              responses.append(response)
              result.append(pred)
  
          if score:
              correct_ratio = 100 * sum(score) / len(score)
  
          else:
              correct_ratio = 0
  
          return correct_ratio, None
      elif eval_type == "test":
          answers = {}
          for i, row in tqdm(test_df.iterrows(), total=len(test_df)):
              question = self.format_example(row)
              response, _ = self.model.chat(
                  self.tokenizer,
                  question,
                  history=None,
              )
              pred = self.extract_answer(response, row)
              answers[str(i)] = pred
          return None, answers
  
file_path: BigDL/python/llm/dev/benchmark/ceval/evaluators/qwen.py
imports: import re
  from tqdm import tqdm
  import torch
  from thefuzz import process
  from transformers import AutoTokenizer
  from transformers.generation import GenerationConfig
  from bigdl.llm.transformers import AutoModelForCausalLM
  from evaluators.evaluator import Evaluator
label_desc: Use image node_id 7 for calling the QwenEvaluator obj's underlying member method code with example usage: obj.eval_subject(subject_name, test_df, eval_type) and returns: correct_ratio,  None, None,  answers