checkpoint_engine.py 604 B

123456789101112131415161718192021222324252627
  1. '''Copyright The Microsoft DeepSpeed Team'''
  2. import os
  3. class CheckpointEngine(object):
  4. # init checkpoint engine for save/load
  5. def __init__(self, config_params=None):
  6. pass
  7. def create(self, tag):
  8. # create checkpoint on give tag for save/load.
  9. pass
  10. def makedirs(self, path, exist_ok=False):
  11. os.makedirs(path, exist_ok=exist_ok)
  12. def save(self, state_dict, path: str):
  13. pass
  14. def load(self, path: str, map_location=None):
  15. pass
  16. def commit(self, tag):
  17. # to tell checkpoint services if all files are readys.
  18. pass