class_docstr: Evaluate for trained models.
docstr: launch_evaluation
  :param exe: executor.
  :param program: paddle program.
  :param reader: test reader.
  :param fetch_list: fetch list.
  :param num_workers: num of workers.
  :return: None
docstr_tok: ["launch_evaluation",":","param","exe",":","executor",".",":","param","program",":","paddle","program",".",":","param","reader",":","test","reader",".",":","param","fetch_list",":","fetch","list",".",":","param","num_workers",":","num","of","workers",".",":","return",":","None"]
code: def launch_evaluation(
      self, exe, program, reader, fetch_list, num_workers=4
  ):
      """
      launch_evaluation
      :param exe: executor.
      :param program: paddle program.
      :param reader: test reader.
      :param fetch_list: fetch list.
      :param num_workers: num of workers.
      :return: None
      """
  
      def func(training_triple_pool):
          """func"""
  
          def run_func(results):
              """run_func"""
              return self.rank_extract(results, training_triple_pool)
  
          return run_func
  
      def iterator():
          """iterator"""
          n_used_eval_triple = 0
          start = timeit.default_timer()
          for batch_feed_dict in reader():
              head_score, tail_score = exe.run(
                  program=program,
                  fetch_list=fetch_list,
                  feed=batch_feed_dict,
              )
              yield batch_feed_dict[
                  "test_triple"
              ], head_score, tail_score
              n_used_eval_triple += 1
              if n_used_eval_triple % 500 == 0:
                  print(
                      "[{:.3f}s] #evaluation triple: {}/{}".format(
                          timeit.default_timer() - start,
                          n_used_eval_triple,
                          self.reader.test_num,
                      )
                  )
  
      res_reader = mp_reader_mapper(
          reader=iterator,
          func=func(self.training_triple_pool),
          num_works=num_workers,
      )
      self.result(res_reader)
  
file_path: PGL/legacy/examples/pgl-ke/evalutate.py
imports: import numpy
  import timeit
  from mp_mapper import mp_reader_mapper
  from pgl.utils.logger import log
label_desc: Use image node_id 3 for calling the Evaluate obj's underlying member method code with example usage: obj.launch_evaluation(exe, program, reader, fetch_list, num_workers) and returns: run_func, self