code: def model_evaluate(args):
      prediction_file = os.path.join(
          args.relation_output_dir, args.relation_prediction_file
      )
      data = Dataset(prediction_file)
      eval_result = evaluate_predictions(data)
      print("Evaluation result %s" % (prediction_file))
      print(
          "NER - P: %f, R: %f, F1: %f"
          % (
              eval_result["ner"]["precision"],
              eval_result["ner"]["recall"],
              eval_result["ner"]["f1"],
          )
      )
      print(
          "REL - P: %f, R: %f, F1: %f"
          % (
              eval_result["relation"]["precision"],
              eval_result["relation"]["recall"],
              eval_result["relation"]["f1"],
          )
      )
      print(
          "REL (strict) - P: %f, R: %f, F1: %f"
          % (
              eval_result["strict_relation"]["precision"],
              eval_result["strict_relation"]["recall"],
              eval_result["strict_relation"]["f1"],
          )
      )
  
file_path: DeepKE/example/triple/PURE/predict.py
imports: import os
  import json
  import argparse
  import hydra
  from hydra.utils import get_original_cwd
  import torch
  import logging
  import tqdm
  import wandb
  from models import *
  from models.data_structures import Dataset, evaluate_predictions
  from run_entity import *
  from run_relation import *
label_desc: Use image node_id 2 for calling a global function with example usage: model_evaluate(args) without return types