env-full / lib /python3.12 /site-packages /deepspeed /runtime /checkpoint_engine /checkpoint_engine.py
Download lib/python3.12/site-packages/deepspeed/runtime/checkpoint_engine/checkpoint_engine.py from parallel-reasoner/env-full: direct link, hf CLI and curl.
- Browser
- Download file 653 Bytes
-
https://huggingface.co/parallel-reasoner/env-full/resolve/2f00a8badb7f953ffc93515c2b0646dc658d8ce8/lib/python3.12/site-packages/deepspeed/runtime/checkpoint_engine/checkpoint_engine.py
- Command line
-
hf download hf://parallel-reasoner/env-full@2f00a8badb7f953ffc93515c2b0646dc658d8ce8/lib/python3.12/site-packages/deepspeed/runtime/checkpoint_engine/checkpoint_engine.py
-
curl -L -o checkpoint_engine.py https://huggingface.co/parallel-reasoner/env-full/resolve/2f00a8badb7f953ffc93515c2b0646dc658d8ce8/lib/python3.12/site-packages/deepspeed/runtime/checkpoint_engine/checkpoint_engine.py
653 Bytes
| # Copyright (c) Microsoft Corporation. | |
| # SPDX-License-Identifier: Apache-2.0 | |
| # DeepSpeed Team | |
| import os | |
| class CheckpointEngine(object): | |
| # init checkpoint engine for save/load | |
| def __init__(self, config_params=None): | |
| pass | |
| def create(self, tag): | |
| # create checkpoint on give tag for save/load. | |
| pass | |
| def makedirs(self, path, exist_ok=False): | |
| os.makedirs(path, exist_ok=exist_ok) | |
| def save(self, state_dict, path: str): | |
| pass | |
| def load(self, path: str, map_location=None): | |
| pass | |
| def commit(self, tag): | |
| # to tell checkpoint services if all files are ready. | |
| pass | |