Distributed training for your local machine
Project description
hyrax-lib
Distributed training for your local machine. No Kubernetes, no cloud, all offline locally
_
| |__ _ _ _ __ __ ___ __
| '_ \| | | | '__/ _` \ \/ /
| | | | |_| | | | (_| |> <
|_| |_|\__, |_| \__,_/_/\_\
|___/
What this is
I kept launching multiple training jobs manually across my GPUs and thought "why isn't there something simple for this?" Ray and Kubernetes(Kuberay) felt like overkill for a single machine.
So I built hyrax, it takes one model and multiple datasets, finds your GPU(s), and trains everything concurrently.
Install
Work in progress to make it a library
pip install hyrax
Example usage
from hyrax import DistributedTrainer
import minari
# train behavioral cloning model on 3 MuJoCo datasets
trainer = DistributedTrainer(
model=BehavioralCloningModel,
datasets=[
"mujoco/humanoid/expert-v0",
"mujoco/halfcheetah/expert-v0",
"mujoco/hopper/expert-v0"
],
dataset_loader=minari.load_dataset,
auto_balance=True
)
results = trainer.train(epochs=200)
Hyrax detects your hardware, distributes the work, and trains all three concurrently.
Additionally there is also flexible dataset loading for different use cases
# Option 1: let hyrax load datasets
trainer = DistributedTrainer(
model=MyModel,
datasets=["dataset1", "dataset2", "dataset3"],
dataset_loader=minari.load_dataset
)
# Option 2: pass pre-loaded datasets
datasets = [load_my_data(x) for x in ["a", "b", "c"]]
trainer = DistributedTrainer(
model=MyModel,
datasets=datasets
)
# Option 3: custom config
trainer = DistributedTrainer(
model=MyModel,
dataset_config={
'source': 'minari',
'names': ['mujoco/humanoid/expert-v0', ...],
'download': True
}
)
Works with minari, pickle files, HDF5, custom loaders, anything.
why hyrax
Rock hyrax look super cute and cuddly
Features
- auto GPU detection and allocation
- resource checking before training starts
- concurrent training across datasets
- progress monitoring for all workers
- works completely offline
- dataset agnostic (minari, pickle, HDF5, custom)
NOT GOOD FOR
- Multi-machine clusters
- Distributed inference
- Full MLOps pipelines
Project details
Release history Release notifications | RSS feed
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 hyrax_lib-0.1.0.tar.gz.
File metadata
- Download URL: hyrax_lib-0.1.0.tar.gz
- Upload date:
- Size: 8.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1826db31ed4b0a6cda2a71674efd8f88c95c9fa0821f89cc0ba1bcc7f6a5a6ae
|
|
| MD5 |
dfc766f64232c545db4dfbf5a4f0e659
|
|
| BLAKE2b-256 |
9a084fc300d0c9858075c0c86cb1f651fa8baa7436a4fe130346a9a1eb8f20de
|
Provenance
The following attestation bundles were made for hyrax_lib-0.1.0.tar.gz:
Publisher:
publish.yml on BaljinderHothi/hyrax-lib
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
hyrax_lib-0.1.0.tar.gz -
Subject digest:
1826db31ed4b0a6cda2a71674efd8f88c95c9fa0821f89cc0ba1bcc7f6a5a6ae - Sigstore transparency entry: 854271352
- Sigstore integration time:
-
Permalink:
BaljinderHothi/hyrax-lib@855ff2f97ad1871511e33514969e908420eba3ba -
Branch / Tag:
refs/heads/main - Owner: https://github.com/BaljinderHothi
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@855ff2f97ad1871511e33514969e908420eba3ba -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file hyrax_lib-0.1.0-py3-none-any.whl.
File metadata
- Download URL: hyrax_lib-0.1.0-py3-none-any.whl
- Upload date:
- Size: 8.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0b0ffed7c2727557e362277d221f6418e3d051d6495bbf2b3a69cf90b6b7c982
|
|
| MD5 |
56fa043fc63f3d77a1e5c4310f701767
|
|
| BLAKE2b-256 |
834565678aeaf4aa7326cfa52d83ff3a61f7fd078c88196b4d71e7a2143ae994
|
Provenance
The following attestation bundles were made for hyrax_lib-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on BaljinderHothi/hyrax-lib
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
hyrax_lib-0.1.0-py3-none-any.whl -
Subject digest:
0b0ffed7c2727557e362277d221f6418e3d051d6495bbf2b3a69cf90b6b7c982 - Sigstore transparency entry: 854271407
- Sigstore integration time:
-
Permalink:
BaljinderHothi/hyrax-lib@855ff2f97ad1871511e33514969e908420eba3ba -
Branch / Tag:
refs/heads/main - Owner: https://github.com/BaljinderHothi
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@855ff2f97ad1871511e33514969e908420eba3ba -
Trigger Event:
workflow_dispatch
-
Statement type: