PiePline
Neural networks training pipeline based on PyTorch. Designed to standardize training process and accelerate experiments.
- Core is about 2K lines, covered by tests, that you don't need to write again
- Flexible and customizable training process
- Checkpoints management and train process resuming (source and target device independent)
- Metrics processing and visualization by builtin (tensorboard, Matplotlib) or custom monitors
- Training best practices (e.g. learning rate decaying and hard negative mining)
- Metrics logging and comparison (DVC compatible)
Getting started:
Documentation
See the examples
- MNIST classification - notebook, file, Kaggle kernel
- Segmentation - notebook, file
- Resume training process - file
PiePline short overview:
import torch
from neural_pipeline.builtin.monitors.tensorboard import TensorboardMonitor
from neural_pipeline.monitoring import LogMonitor
from neural_pipeline import DataProducer, TrainConfig, TrainStage,\
ValidationStage, Trainer, FileStructManager
from somethig import MyNet, MyDataset
fsm = FileStructManager(base_dir='data', is_continue=False)
model = MyNet().cuda()
train_dataset = DataProducer([MyDataset()], batch_size=4, num_workers=2)
validation_dataset = DataProducer([MyDataset()], batch_size=4, num_workers=2)
train_config = TrainConfig(model, [TrainStage(train_dataset),
ValidationStage(validation_dataset)], torch.nn.NLLLoss(),
torch.optim.SGD(model.parameters(), lr=1e-4, momentum=0.5))
trainer = Trainer(train_config, fsm, torch.device('cuda:0')).set_epoch_num(50)
trainer.monitor_hub.add_monitor(TensorboardMonitor(fsm, is_continue=False))\
.add_monitor(LogMonitor(fsm))
trainer.train()
This example of training MyNet on MyDataset with vizualisation in Tensorflow and with metrics logging for further experiments comparison.
Installation:
pip install piepline
For builtin module using install:
pip install tensorboardX matplotlib
Install latest version before it's published on PyPi
pip install -U git+https://github.com/PiePline/piepline
Metadata
Release files for piepline 0.3.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| piepline-0.3.2-py3-none-any.whl | Python 3 | none | any | Details for piepline-0.3.2-py3-none-any.whl |
Release files / piepline-0.3.2-py3-none-any.whl
| Download URL | piepline-0.3.2-py3-none-any.whl |
|---|---|
| Size | 31.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a632501c9dc5557ab04e964ff7b5b145cc28292cadb351298cc76075e36c65b1
|
|
BLAKE2b-256 checksum How to use checksums |
e49f0c4e90cdd804f36b3d9ac5e92c102411218926364a0ea2b136b07b423848
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.8
|
Security for piepline 0.3.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.