PyCandle is a lightweight library for pytorch that makes running experiments easy, structured, repeatable and avoids boilerplate code. It maintains flexibilty and allows to train also more complex models like recurrent or generative neural networks conveniently.
Usage
This code snippet creates a timestamped directory for the current experiment, runs the training of the model, creates a backup of all used code, logs current git hash and forks console output into a log file:
model = Net().cuda()
experiment = Experiment('mnist_example')
train_loader = load_dataset(batch_size_train=64)
optimizer = torch.optim.Adam(model.parameters(), lr=0.01)
model_trainer = ModelTrainer(model, optimizer, F.nll_loss, 20, train_loader, gpu=0)
model_trainer.start_training()
A complete example for training a model to classify hand-written MNIST digits can be found in minimal_example/mnist.py.
Installation
Via PIP
The easiest way to install pycandle is through pip:
pip install pycandle
Requirements
We tested PyCandle with the dependency versions listed here. However, PyCandle can also work with newer versions if they are downward compatible.
- Python 3.5.4
- PyTorch 0.4.1
- cudnn 7.0.5
- torchvision 0.2.1 (for examples)
- matplotlib 2.1.1 (for examples)
Metadata
Release files for pycandle 1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| pycandle-1.0.tar.gz | 12.5 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pycandle-1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 28.1 kB
Release files / pycandle-1.0.tar.gz
| Download URL | pycandle-1.0.tar.gz |
|---|---|
| Size | 12.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a7bf58f6671817a0d8308c4d043a84d2cbf7d1db958a79c81abb4511d52a8257
|
|
BLAKE2b-256 checksum How to use checksums |
d6ed62ec86d2c18079d557310968e9fb74a08a0b91b16a8300752fdf9db17272
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.14.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3
|
Release files / pycandle-1.0-py3-none-any.whl
| Download URL | pycandle-1.0-py3-none-any.whl |
|---|---|
| Size | 15.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
861bcde07b4e27920f28fb723c18fbc5bef1089bdf739e9f81f43f3b7c9dfdf1
|
|
BLAKE2b-256 checksum How to use checksums |
4307970d2ceee68cde276e09442e2bfc09d687f5fc545fbc80f0a28b3fd121b0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.14.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3
|
Security for pycandle 1.0
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.