class_docstr: 🤗 Constructor for the image classifier trainer
class_docstr_tok: ["\ud83e\udd17","Constructor","for","the","image","classifier","trainer"]
code: def evaluate_f1_score(self):
      # Get the hypothesis and predictions
      all_target, all_preds = self.evaluate()
  
      cr = metrics.classification_report(
          all_target,
          all_preds,
          labels=[int(a) for a in list(self.ids2labels.keys())],
          target_names=list(self.labels2ids.keys()),
          zero_division=0,
          digits=self.classification_report_digits,
      )
      print(cr)
  
      # Write logs
      self.__openLogs()
      self.logs_file.write(cr + "\n")
      self.logs_file.close()
  
      print("Logs saved at: \033[93m" + self.logs_path + "\033[0m")
  
      return all_target, all_preds
  
file_path: HugsVision/hugsvision/nnet/VisionClassifierTrainer.py
imports: import os
  from datetime import datetime
  import torch
  from sklearn import metrics
  from sklearn.metrics import precision_recall_fscore_support
  from transformers import Trainer
  from transformers.training_args import TrainingArguments
  from transformers.feature_extraction_utils import FeatureExtractionMixin
  from tqdm import tqdm
  from PIL import Image
  from hugsvision.dataio.ImageClassificationCollator import ImageClassificationCollator
label_desc: Use image node_id 4 for calling the VisionClassifierTrainer obj's underlying member method code with example usage: obj.evaluate_f1_score() and returns: all_target,  all_preds