hideandseek
Highly modularized deep learning training library.
Why use hideandseek?
-
Easy training & saving deep learning models along with other modules (ex: preprocessing modules) required in inference
-
Run multiple deep learning experiments in parallel on multiples GPUs (powered by hydra, and python multiprocessing)
-
Design and analyze experiments scientifically by modifying variables (powered by hydra)
-
Modularized machine learning pipeline allows using the same script for all types of experiments
-
The same training code can be run in privacy preserving setting by minimal modifications
Currently prettifying codes. (30.10.2022.)
import torch
import torch.nn as nn
# Generate data
x = torch.rand(200,1)
y = 5*x+2
network = nn.Linear(1,1)
dataset = torch.utils.data.TensorDataset(x, y)
criterion = nn.MSELoss()
cfg = {
'lr': 1e-2,
'batch_size': 32,
'epoch': 10 # optional
}
# Training configuration. All you need to train a neural network
kwargs = {
'network':network,
'dataset':dataset,
'cfg_train':cfg,
'criterion':criterion,
'name': 'Test' # optional
}
trainer = hs.N.Node(**kwargs)
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
trainer.network.to(device)
# Train for predefined number of epochs
trainer.train() # Train for predefined number of epochs
trainer.train(5) # Train for specified number of epochs
trainer.train(epoch=5) # Same thing with trainer.train(5)
trainer.train(step=500) # Train for specified number of updates
trainer.network.cpu()
and simply run multiple batch of experiments with a single line command such as:
python train.py -m lr=1e-3,1e-2 batch_size=32,64 "random_seed=range(0,5)" \
hydra/launcher=joblib hydra.launcher.n_jobs=8
# Runs total of 2*2*5=40 batch of experiments, with 8 processes at a time. Experiment results are stored in hydra.sweep.dir which can be overridden.
To do
- Draw figures to explain hideandseek
- GUI for generating experiment scripts when conducting variable sweeps
Release files for hideandseek 0.2.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| hideandseek-0.2.2.tar.gz | 21.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| hideandseek-0.2.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 51.3 kB
Release files / hideandseek-0.2.2.tar.gz
| Download URL | hideandseek-0.2.2.tar.gz |
|---|---|
| Size | 21.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ea357f11f98614dc53c0508f7a590f497d33df98e2f7c4fb6ac011e89933fead
|
|
BLAKE2b-256 checksum How to use checksums |
e3ed714e1ada09a4581c9988241246529e74b738c56b206305c380a417fbf901
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.12
|
Release files / hideandseek-0.2.2-py3-none-any.whl
| Download URL | hideandseek-0.2.2-py3-none-any.whl |
|---|---|
| Size | 30.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d5c0a9667bf58342801287a6a84ab3790da0b6b760f8d2fce82d10549f4749b6
|
|
BLAKE2b-256 checksum How to use checksums |
a973d61ad2a9da61966b941162d14ba54897f0194374f2badbdda13abe8d8eed
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.12
|