Distribution initialization util tool
Project description
idr_torch
Description
Permet de récupérer les variables SLURM afin de gérér le multi-GPU/multi-noeuds pour le parallélisme sur Pytorch.
import torch.distributed as dist
import idr_torch
if idr_torch.rank == 0:
print(">>> Training on ", len(idr_torch.nodelist), " nodes and ", idr_torch.world_size, " processes")
dist.init_process_group(backend='nccl',
init_method='env://',
world_size=idr_torch.world_size,
rank=idr_torch.rank)
Si on veut rajouter une nouvelle API, on peut la mettre dans le dossier api et l'importer dans le __init__.py. Ou alors on peut la coder n'importe où, et après appeler idr_torch.register_api(nouvelle_api).
Les nouvelles APIs doivent hériter de idr_torch.API. Si on veut faire en sorte que la MASTER_ADDR et le MASTER_PORT soit mis automatiquement (dans le cas où le lanceur ne le fait pas comme SLURM), alors il faut utiliser idr_torch.AutoMasterAddressPort comme décorateur de notre nouvelle API.
On patche aussi le profiler. Il suffit de remplacer from torch.profiler import ... par from idr_torch.profiler import ....
Note : idr_torch est compatible avec submitit.
Installation
With idr-pypi 🐍 (by default)
pip install idris[torch]
Master from idr-pypi 🐍
pip install idris-nightly[torch]
From source
git clone https://idrforge.prive.idris.fr/assistance/outils/idr_torch.git
cd idr_torch
pip install .
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file idr_torch-2.3.0.tar.gz.
File metadata
- Download URL: idr_torch-2.3.0.tar.gz
- Upload date:
- Size: 11.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9c93934f3dda99c51078693b420d3cb1370aac48397677dccb1b2ac02d9a1dbe
|
|
| MD5 |
416698d1d3dcea86ee9ff08b8c6c19e8
|
|
| BLAKE2b-256 |
57db736b4d6e5ac81ae73fd54e93d1ba9137498260151c7380bbd61f288c27ba
|
Provenance
The following attestation bundles were made for idr_torch-2.3.0.tar.gz:
Publisher:
release.yml on idriscnrs/idr_torch
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
idr_torch-2.3.0.tar.gz -
Subject digest:
9c93934f3dda99c51078693b420d3cb1370aac48397677dccb1b2ac02d9a1dbe - Sigstore transparency entry: 171904739
- Sigstore integration time:
-
Permalink:
idriscnrs/idr_torch@3d66960e3b1c1c48ed12a4a2a68141e2734c2994 -
Branch / Tag:
refs/tags/v2.3.0 - Owner: https://github.com/idriscnrs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@3d66960e3b1c1c48ed12a4a2a68141e2734c2994 -
Trigger Event:
release
-
Statement type:
File details
Details for the file idr_torch-2.3.0-py3-none-any.whl.
File metadata
- Download URL: idr_torch-2.3.0-py3-none-any.whl
- Upload date:
- Size: 14.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
866c89754d32e110a8396cce363b1ae82fc69f0b94922008d897c14be61f395c
|
|
| MD5 |
8e7382b964f6438815796f8c2e779881
|
|
| BLAKE2b-256 |
d76200055ebce3a37ee332aeaa907372291e81d3a66a57f526f43fc70176c710
|
Provenance
The following attestation bundles were made for idr_torch-2.3.0-py3-none-any.whl:
Publisher:
release.yml on idriscnrs/idr_torch
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
idr_torch-2.3.0-py3-none-any.whl -
Subject digest:
866c89754d32e110a8396cce363b1ae82fc69f0b94922008d897c14be61f395c - Sigstore transparency entry: 171904744
- Sigstore integration time:
-
Permalink:
idriscnrs/idr_torch@3d66960e3b1c1c48ed12a4a2a68141e2734c2994 -
Branch / Tag:
refs/tags/v2.3.0 - Owner: https://github.com/idriscnrs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@3d66960e3b1c1c48ed12a4a2a68141e2734c2994 -
Trigger Event:
release
-
Statement type: