class_docstr: Utility class for distributed infer of PaddlePaddle.
class_docstr_tok: ["Utility","class","for","distributed","infer","of","PaddlePaddle","."]
code: def _init_dense_params(self, exe=None, dirname=None):
      import paddle.distributed.fleet as fleet
  
      sparse_table_maps = self._get_sparse_table_map()
  
      if dirname is not None and exe is not None:
          all_persist_vars = [
              v
              for v in self.origin_main_program.list_vars()
              if paddle.static.io.is_persistable(v)
          ]
          dense_persist_vars = [
              (v.name, v)
              for v in all_persist_vars
              if v.name not in sparse_table_maps
          ]
          need_load_vars = [
              v[1]
              for v in dense_persist_vars
              if os.path.isfile(os.path.join(dirname, v[0]))
          ]
          paddle.static.load_vars(
              exe,
              dirname,
              main_program=self.origin_main_program,
              vars=need_load_vars,
          )
  
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 4 for calling the DistributedInfer obj's underlying member method code with example usage: obj._init_dense_params(exe, dirname) without return types