parameters: (self, executor, dirname, main_program=None, **kwargs)
return_statement: return feasign_num
docstring: save sparse cache table,
          when using fleet, it will save sparse cache table
          Args:
              executor(Executor): fluid executor
              dirname(str): save path. It can be hdfs/afs path or local path
              main_program(Program): fluid program, default None
              kwargs: use define property, current support following
                  mode(int): define for feature extension in the future,
                             currently no use, will pass a default value 0
                  table_id(int): which table to save cache, default is 0
          Returns:
              feasign_num(int): cache feasign num
          Example:
              .. code-block:: python
                fleet.save_cache_model(None, dirname="/you/path/to/model", mode = 0)
docstring_summary: save sparse cache table,
          when using fleet, it will save sparse cache table
          Args:
              executor(Executor): fluid executor
              dirname(str): save path. It can be hdfs/afs path or local path
              main_program(Program): fluid program, default None
              kwargs: use define property, current support following
                  mode(int): define for feature extension in the future,
                             currently no use, will pass a default value 0
                  table_id(int): which table to save cache, default is 0
          Returns:
              feasign_num(int): cache feasign num
          Example:
              .. code-block:: python
                fleet.save_cache_model(None, dirname="/you/path/to/model", mode = 0)
docstring_tokens: save sparse cache table when using fleet it will save sparse cache table Args : executor ( Executor ) : fluid executor dirname ( str ) : save path . It can be hdfs / afs path or local path main_program ( Program ) : fluid program default None kwargs : use define property current support following mode ( int ) : define for feature extension in the future currently no use will pass a default value 0 table_id ( int ) : which table to save cache default is 0 Returns : feasign_num ( int ) : cache feasign num Example : .. code - block :: python fleet . save_cache_model ( None dirname = / you / path / to / model mode = 0 )
function: def save_cache_model(self, executor, dirname, main_program=None, **kwargs):
          """
          save sparse cache table,
          when using fleet, it will save sparse cache table
          Args:
              executor(Executor): fluid executor
              dirname(str): save path. It can be hdfs/afs path or local path
              main_program(Program): fluid program, default None
              kwargs: use define property, current support following
                  mode(int): define for feature extension in the future,
                             currently no use, will pass a default value 0
                  table_id(int): which table to save cache, default is 0
          Returns:
              feasign_num(int): cache feasign num
          Example:
              .. code-block:: python
                fleet.save_cache_model(None, dirname="/you/path/to/model", mode = 0)
          """
          mode = kwargs.get("mode", 0)
          table_id = kwargs.get("table_id", 0)
          self._fleet_ptr.client_flush()
          self._role_maker._barrier_worker()
          cache_threshold = 0.0
  
          if self._role_maker.is_first_worker():
              cache_threshold = self._fleet_ptr.get_cache_threshold(table_id)
          #check cache threshold right or not
          self._role_maker._barrier_worker()
  
          if self._role_maker.is_first_worker():
              self._fleet_ptr.cache_shuffle(table_id, dirname, mode,
                                            cache_threshold)
  
          self._role_maker._barrier_worker()
  
          feasign_num = -1
          if self._role_maker.is_first_worker():
              feasign_num = self._fleet_ptr.save_cache(table_id, dirname, mode)
  
          self._role_maker._barrier_worker()
          return feasign_num
function_tokens: def save_cache_model ( self , executor , dirname , main_program = None , * * kwargs ) : mode = kwargs . get ( "mode" , 0 ) table_id = kwargs . get ( "table_id" , 0 ) self . _fleet_ptr . client_flush ( ) self . _role_maker . _barrier_worker ( ) cache_threshold = 0.0 if self . _role_maker . is_first_worker ( ) : cache_threshold = self . _fleet_ptr . get_cache_threshold ( table_id ) #check cache threshold right or not self . _role_maker . _barrier_worker ( ) if self . _role_maker . is_first_worker ( ) : self . _fleet_ptr . cache_shuffle ( table_id , dirname , mode , cache_threshold ) self . _role_maker . _barrier_worker ( ) feasign_num = - 1 if self . _role_maker . is_first_worker ( ) : feasign_num = self . _fleet_ptr . save_cache ( table_id , dirname , mode ) self . _role_maker . _barrier_worker ( ) return feasign_num