class_docstr: Utility class for distributed infer of PaddlePaddle.
class_docstr_tok: ["Utility","class","for","distributed","infer","of","PaddlePaddle","."]
code: def __init__(self, main_program=None, startup_program=None):
      if main_program:
          self.origin_main_program = main_program.clone()
      else:
          self.origin_main_program = (
              paddle.static.default_main_program().clone()
          )
  
      if startup_program:
          self.origin_startup_program = startup_program
      else:
          self.origin_startup_program = (
              paddle.static.default_startup_program()
          )
      self.sparse_table_maps = None
  
file_path: PGL/apps/Graph4Rec/env_run/src/utils/ps_util.py
imports: import numpy
  import os
  import paddle
  import warnings
label_desc: Use image node_id 1 to create a new DistributedInfer object  with example: obj = DistributedInfer(main_program, startup_program)