mantra is a rapid development framework for deep learning.
Problem: Every ML project needs a way to train, track and share models. But every project does it in a different way with a lot of boilerplate code being needlessly reinvented.
Solution: mantra is a framework for writing dataset and model classes that enables single line training, has a tracking UI, and makes it easy to encapsulate and share results.
- Boilerplate classes for common dataset and model types
- Command-line interface for training with parameter parsing
- Automatic provisioning of cloud instances for remote training
- UI for monitoring training, comparing experiments and storing media
- Encapsulation of datasets and models by design, enabling easy sharing
This is an alpha release. All contributions are welcome - see here for guidelines on how to contribute.
mantra launch my_project
☁ Configure your cloud settings and API keys:
cd my_project mantra cloud
mantra import https://github.com/RJT1990/mantra-examples.git
mantra train relativistic_gan --dataset decks --cloud --dev --image-dim 256 256
mantra train log_reg --dataset epl_data --target home_win --features feature_1 feature_2 feature_3
To install mantra, you can use pip:
pip install mantraml
You should also have TensorFlow or PyTorch installed depending on which framework you intend to use.
Mantra is tested on Python 3.5+. It is not currently supported on Windows, but we'll look to get support in the near future.
You will need to install AWS CLI as a dependency.
Login to AWS through a browser, click your name in the menubar and click My Security Credentials.
Create a new Access Key and make a note of the Access Key ID and Secret Access Key.
From terminal enter the following:
johnsmith@computer:~$ pip install awscli johnsmith@computer:~$ aws configure
Once prompted, enter your AWS details and your default region (e.g. us-east-1).
Now your credentials will be accessible by the boto3 AWS SDK library, which will allow Mantra to be used to provision cloud instances on your request.
Use mantra cloud from your mantra project root to configure your cloud settings.
You should also ensure you are happy with the default instance settings in mantra - you can check this in the settings.py file in your project root.
Sharing on Mantrahub
Visit Mantrahub to share mantra components like models and datasets with our open source community. To import models or datasets:
mantra import RJT1990/models/wgangp
mantra import RJT1990/data/decks
To upload models, datasets or results to mantrahub:
mantra upload data/decks
mantra upload models/wgangp
mantra upload results/celebagan
Arise! Awake! Approach the great and learn.