class_docstr: Save the result of inference.
docstr: main func entrypoint
docstr_tok: ["main","func","entrypoint"]
code: def call(self, predictions, log_verbose=False):
      """main func entrypoint"""
      preds = predictions["preds"]
      output_index = predictions["output_index"]
      if output_index is None:
          res_file = self.config["solver"]["postproc"].get(
              "res_file", ""
          )
          label_path_file = self.config["data"]["task"]["label_vocab"]
      else:
          res_file = self.config["solver"]["postproc"][
              output_index
          ].get("res_file", "")
          label_path_file = self.config["data"]["task"]["label_vocab"][
              output_index
          ]
  
      if res_file == "":
          logging.info(
              "Infer res not saved. You can check 'res_file' in your config."
          )
          return
      res_dir = os.path.dirname(res_file)
      if not os.path.exists(res_dir):
          os.makedirs(res_dir)
      logging.info("Save inference result to: {}".format(res_file))
  
      preds = ids_to_sentences(preds, label_path_file)
  
      with open(res_file, "w", encoding="utf-8") as in_f:
          for i, pre in enumerate(preds):
              entities = get_entities(
                  pre
              )  # [('PER', 0, 1), ('LOC', 3, 3)]
              if not entities:
                  in_f.write("Null")
              else:
                  new_line = "\t".join(
                      [
                          " ".join(map(str, entity))
                          for entity in entities
                      ]
                  )
                  in_f.write(new_line)
              in_f.write("\n")
  
file_path: delta/delta/utils/postprocess/text_seq_label_proc.py
imports: import os
  from absl import logging
  from seqeval.metrics.sequence_labeling import get_entities
  from delta.utils.postprocess.base_postproc import PostProc
  from delta.utils.register import registers
  from delta.utils.postprocess.postprocess_utils import ids_to_sentences
label_desc: Use image node_id 1 for calling the SavePredEntityPostProc obj's underlying member method code with example usage: obj.call(predictions, log_verbose) without return types