Skip to main content

library for deep learning and privacy preserving deep learning

Project description

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

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

hideandseek-0.1.19.tar.gz (22.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

hideandseek-0.1.19-py3-none-any.whl (24.9 kB view details)

Uploaded Python 3

File details

Details for the file hideandseek-0.1.19.tar.gz.

File metadata

  • Download URL: hideandseek-0.1.19.tar.gz
  • Upload date:
  • Size: 22.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.12

File hashes

Hashes for hideandseek-0.1.19.tar.gz
Algorithm Hash digest
SHA256 3c3bd915e5c6c26c8ae8155669e1d0d7c1c31ffa7afdab8a658fbfa93f784904
MD5 131bfb1c115526fd8a64cf5c81dcc392
BLAKE2b-256 d66afe13333acc1d92ed90e71107e81758e5a1b0ff62aa2c093aafd0741341d4

See more details on using hashes here.

File details

Details for the file hideandseek-0.1.19-py3-none-any.whl.

File metadata

  • Download URL: hideandseek-0.1.19-py3-none-any.whl
  • Upload date:
  • Size: 24.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.12

File hashes

Hashes for hideandseek-0.1.19-py3-none-any.whl
Algorithm Hash digest
SHA256 e2cd34703b43d6386ded957a4eefc5736301ee7a58d30e2ce57fb233a203be7c
MD5 75849f80d3929c6e84969700305c6a65
BLAKE2b-256 06a0c5e14b72ef9e315e0b1173567490032fa3a4c758a219b5d05f9ad6e4a4e6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page