code: def main(_):
      """main func"""
      FLAGS = app.flags.FLAGS  # pylint: disable=invalid-name
      logging.info("config: {}".format(FLAGS.config))
      logging.info("mode: {}".format(FLAGS.mode))
      logging.info("gpu_visible: {}".format(FLAGS.gpu))
      assert FLAGS.config, "pls give a config.yaml"
      assert FLAGS.mode, "pls give mode [eval|infer|eval_and_infer]"
      os.environ[
          "CUDA_VISIBLE_DEVICES"
      ] = FLAGS.gpu  # selects a specific device
  
      # create dataset
      mode = utils.INFER if FLAGS.mode == "infer" else utils.EVAL
  
      # load config
      config = utils.load_config(FLAGS.config)
  
      # process config
      import_all_modules_for_register()
      solver_name = config["solver"]["name"]
      logging.info(f"sovler: {solver_name}")
      solver = registers.solver[solver_name](config)
      config = solver.config
  
      # Evaluate
      evaluate_name = config["serving"]["name"]
      logging.info(f"evaluate: {evaluate_name}")
      evaluate = registers.serving[evaluate_name](
          config, gpu_str=FLAGS.gpu, mode=mode
      )
  
      if FLAGS.debug:
          evaluate.debug()
      evaluate.predict()
  
file_path: delta/egs/conll2003/seq_label/v1/utils/run_saved_model.py
imports: import os
  from absl import logging
  from absl import flags
  from absl import app
  from delta import utils
  from delta.utils.register import registers
  from delta.utils.register import import_all_modules_for_register
label_desc: Use image node_id 1 for calling a global function with example usage: main(_) without return types