Skip to content

frogbox

Frogbox is an opinionated PyTorch machine learning framework built for rapid prototyping and research.

Features

  • Experiments are defined using YAML or JSON files and support jinja2 templates.
  • Flexible event system inspired by Ignite.
  • Automatic experiment tracking. Currently, Weights & Biases and MLFlow is supported with other platforms planned.
  • CLI tool for easy project management.
  • Integrates Accelerate to support automatic mixed precision (AMP) and distributed training.

Installation

pip install frogbox

Creating a new project

Create a configuration file using the frogbox CLI tool:

frogbox project new -f yaml -o config.yml
frogbox project new -f json -o config.json

Implement your model as a torch.nn.Module and your dataset as a torch.utils.data.Dataset and configure the training pipeline by editing the newly created config file.

Before training, configure your training system with accelerate:

accelerate config

Then launch the training pipeline:

accelerate launch -m frogbox.run -c config.yml

See example projects in the examples folder on GitHub.