Download clean/image/yermandy/src/utils/constants.py from deepsafe/model-code: direct link, hf CLI and curl.
- Browser
- Download file 293 Bytes
-
https://huggingface.co/deepsafe/model-code/resolve/main/clean/image/yermandy/src/utils/constants.py
- Command line
-
hf download hf://deepsafe/model-code/clean/image/yermandy/src/utils/constants.py
-
curl -L -o constants.py https://huggingface.co/deepsafe/model-code/resolve/main/clean/image/yermandy/src/utils/constants.py
293 Bytes
| import os | |
| # See more: https://pytorch.org/docs/stable/elastic/run.html#environment-variables | |
| RANK = int(os.getenv("LOCAL_RANK", 0)) | |
| IS_GLOBAL_ZERO = RANK == 0 | |
| NODE_RANK = int(os.getenv("NODE_RANK", 0)) | |
| LOCAL_RANK = int(os.getenv("LOCAL_RANK", 0)) | |
| WORLD_SIZE = int(os.getenv("WORLD_SIZE", 1)) | |