/bootstrap.pytorch

Highlevel framework for starting Deep Learning projects (lightweight, flexible, easy to extend)

Primary LanguagePythonBSD 3-Clause "New" or "Revised" LicenseBSD-3-Clause

bootstrap.pytorch is a high-level extension for deep learning projects with PyTorch. It aims at accelerating research projects and prototyping by providing a powerful workflow focused on your dataset and model.

And it is:

  • Scalable
  • Modular
  • Shareable
  • Extendable
  • Uncomplicated
  • Built for reproducibility
  • Easy to log and plot anything

Unlike many others, bootstrap.pytorch is not a wrapper over pytorch, but a powerful extension.

Quick tour

To run an experiment (training + evaluation):

python -m bootstrap.run
       -o myproject/options/sgd.yaml

To display parsed options from the yaml file:

python -m bootstrap.run
       -o myproject/options/sgd.yaml
       -h

Running an experiment will create 4 files, here is an example with mnist:

  • options.yaml contains the options used for the experiment
  • logs.txt contains all the information given to the logger
  • logs.json contains the following data: train_epoch.loss, train_batch.loss, eval_epoch.accuracy_top1, etc
  • view.html contains training and evaluation curves with javascript utilities (plotly)

To save the next experiment in a specific directory:

python -m bootstrap.run
       -o myproject/options/sgd.yaml
       --exp.dir logs/custom

To reload an experiment:

python -m bootstrap.run
       -o logs/custom/options.yaml
       --exp.resume last

Documentation

The package reference is available on the documentation website.

It also contains some notes:

Official project modules

Poster

Contribute

Contributions to this repository are welcome and encouraged. We also have a public trello board with prospect features, as well as an indication of those currently being developed. Feel free to contact us with suggestions, or send a pull request.

We use flake8 to perform early semantic checking of submitted code. After installing all the requirements in requirements.txt, please run the following to activate the pre-commit hooks for flake8: pre-commit install

To manually trigger the pre-commit checks for a file without creating a commit, you can run the following command: pre-commit run --files <your_files.py>

bootstrap.pytorch was conceived and is maintained by Rémi Cadène and Micael Carvalho, with helpful discussions and insights from Thomas Robert and Hedi Ben-Younes. We chose to adopt the [very permissive] BSD-3 license, which allows for commercial and private use, making it compatible with both academy and industry standards.