Skip to main content

Configure and train PyTorch models with a lot of the details already or partially implemented.

DISCLAIMER: This repo is used for my research. New versions are not necessarily backwards compatible. The API is subject to change at a moment's notice. If you happen to use it in your research or work, make sure in your requirements.txt to pin the version or reference the specific commit you used so you don't suffer unwanted surprises.

Install

pip install --upgrade simplepytorch

Try an example

Download and extract DRIVE dataset to ./data/DRIVE

 $ ls data/DRIVE 
test  test.zip  training  training.zip

Run an experiment, and give it a name.

$ python examples/simple_example.py  --experiment_id test_experiment_1 --epochs 10

$ ls results/test_experiment_1
checkpoints  log  perf.csv

Look at training curves (note: demo only runs for 2 epochs)

simplepytorch_plot test_experiment  --mode1-subplots

Run demo, with (customizable) guarantees that code completes exactly once and distributes jobs across GPUs. (note: uses Redis database to temporarily monitor current jobs).

redis-server  # must be installed to use the default example
./bin/example_experiments.sh

Use hyperparameter optimization with Ray Tune library.

pip install -U "simplepytorch[ray]"

python examples/hyperparam_opt.py  --experiment_id test_hyperband_1

Datasets:

The library provides PyTorch Dataset implementations for different datasets.

To use the pre-defined dataset classes, you must download the data and unzip it yourself. Consult Dataset class docstring for usage details.

import simplepytorch.datasets as D

dset = D.RITE(use_train_set=True)
dset[0]

For example, some downloaded datasets I use have the following structure:

 $ ls data/{arsn_qualdr,eyepacs,messidor,IDRiD_segmentation,RITE}
data/IDRiD_segmentation:
'1. Original Images'  '2. All Segmentation Groundtruths'   CC-BY-4.0.txt   LICENSE.txt

data/RITE:
AV_groundTruth.zip  introduction.txt  read_me.txt  test  training

data/arsn_qualdr:
README.md  annotations  annotations.zip  imgs1  imgs1.zip  imgs2  imgs2.zip

data/eyepacs:
README.md                 test          test.zip.003  test.zip.006  train.zip.001  train.zip.004
sample.zip                test.zip.001  test.zip.004  test.zip.007  train.zip.002  train.zip.005
sampleSubmission.csv.zip  test.zip.002  test.zip.005  train         train.zip.003  trainLabels.csv.zip

data/messidor:
Annotation_Base11.csv  Annotation_Base21.csv  Annotation_Base31.csv  Base11  Base21  Base31
Annotation_Base12.csv  Annotation_Base22.csv  Annotation_Base32.csv  Base12  Base22  Base32
Annotation_Base13.csv  Annotation_Base23.csv  Annotation_Base33.csv  Base13  Base23  Base33
Annotation_Base14.csv  Annotation_Base24.csv  Annotation_Base34.csv  Base14  Base24  Base34

Metadata

Release files for simplepytorch 1.5.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for simplepytorch 1.5.3
File Size Uploaded Provenance
simplepytorch-1.5.3.tar.gz 63.0 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for simplepytorch 1.5.3
File Interpreter ABI Platform
simplepytorch-1.5.3-py3-none-any.whl Python 3 none any Details

Total release size: 136.7 kB

Release files / simplepytorch-1.5.3.tar.gz

Download URL simplepytorch-1.5.3.tar.gz
Size 63.0 kB
Tags Source
SHA-256 checksum
How to use checksums
70eaade266b5338d2c40596f593f9d9cea9bf8cdae8aa014662302961338a35e
BLAKE2b-256 checksum
How to use checksums
d77e8f435f1ef19c23c4d9c782a32abb8dee369311943cc6466e898b66c8bfd1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.5

Release files / simplepytorch-1.5.3-py3-none-any.whl

Download URL simplepytorch-1.5.3-py3-none-any.whl
Size 73.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
47f5a888d7948a57607639d77cd23ae290f5c00d23552b81cef05e12db46e1a4
BLAKE2b-256 checksum
How to use checksums
08b8249f9410c7d2a96e1ce0e540bd9767eefe0b003713859dd28a03f27f6e98
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.5

Security for simplepytorch 1.5.3

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page