Role of internal `hpc_load` & `hpc_save`
❓ Questions and Help
What is your question?
What is role/responsibility of hpc_load & hpc_save?
Is it same with that of restore?
Motivation
pl has two internal way of save/load,  restore way & hpc_load/hpc_save way.
They do similar dump/loading, and has different checkpoint selection mechanism.
If these two method have same role/responsibility in the sense of dump/loading, we can refactor them with common dump/loading code.
These is already some disparity (#1947), it could be potential bug source.
The motivation of this question is understanding role/responsibility for refactoring.
What have you tried?
Survey public documents and internal codes.
hpc_save
No public API (search result in docs), only used in internal SLURMConnector (search result in repo)

  
    
      pytorch-lightning/pytorch_lightning/trainer/connectors/slurm_connector.py
    
    
         Line 88
      in
      66e58f5
    
  
  
    

        
          
           self.trainer.checkpoint_connector.hpc_save(self.trainer.weights_save_path, self.trainer.logger) 
        
    
  


hpc_load
No public API (search result in docs), only used in internal CheckpointConnector.hpc_load (search result in repo)

  
    
      pytorch-lightning/pytorch_lightning/trainer/connectors/checkpoint_connector.py
    
    
         Line 202
      in
      3abfec8
    
  
  
    

        
          
           self.hpc_load(folderpath, self.trainer.on_gpu)