High-level utils for PyTorch DL/RL research. It was developed with a focus on reproducibility, fast experimentation and code/ideas/models reusing. Being able to research/develop something new, rather then write another regular train loop. Best coding practices included.
- Universal train/inference loop.
- Key-values storages.
- Data and model usage standardization.
- Configuration files - yaml for model/data hyperparameters.
- Loggers and Tensorboard support.
- Reproducibility - even source code will be saved to logs.
- OneCycle lr scheduler and LRFinder support.
- FP16 support for any model.
- Corrected weight decay (AdamW).
- N-best-checkpoints saving (SWA).
- Training stages support - run whole experiment by one command.
- Logdir autonaming based on hyperparameters - make hyperopt search easy again.
- Callbacks - reusable train/inference pipeline parts (and you can write your own if needed).
- Well structed, so you can just grab a part to your project.
- Lots of reusable code for different purposes: losses, optimizers, models, knns, embeddings projector.
catalyst is compatible with: Python 3.6+. PyTorch 0.4.1+. In development.
git submodule add https://github.com/Scitator/catalyst.git catalyst
https://github.com/Scitator/catalyst-examples
CUDA_VISIBLE_DEVICES="{gpus}" PYTHONPATH=. \
python catalyst/dl/scripts/train.py \
--config=/path/to/config-file
CUDA_VISIBLE_DEVICES="{gpus}" PYTHONPATH=. \
python catalyst/dl/scripts/inference.py \
--config=/path/to/config-file,/path/to/inference-config-file \
--resume=/path/to/checkpoint
Waiting for NIPS end. Release date - December 2018.
pip install git+https://github.com/pytorch/tnt.git@master \
tensorboardX jpeg4py albumentations
See ./docker
for more information and examples.
We use yapf for linting,
and the config file is located at .style.yapf
.
We recommend running yapf.sh
prior to pushing to format changed files.
To run the Python linter on a specific file,
run something like flake8 dl/scripts/train.py
.
You may need to first run pip install flake8
.
See codestyle.md
for more information.
- catalyst pic
- distributed training (with fp16 support)
- Horovod support