All Projects β†’ jrieke β†’ Traingenerator

jrieke / Traingenerator

Licence: mit
πŸ§™ A web app to generate template code for machine learning

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Traingenerator

playground
A Streamlit application to play with machine learning models directly from the browser
Stars: ✭ 48 (-94.94%)
Mutual labels:  scikit-learn, sklearn, webapp
Sklearn Evaluation
Machine learning model evaluation made easy: plots, tables, HTML reports, experiment tracking and Jupyter notebook analysis.
Stars: ✭ 294 (-68.99%)
Mutual labels:  scikit-learn, sklearn
Preact Www
πŸ“– Preact documentation website.
Stars: ✭ 272 (-71.31%)
Mutual labels:  website, webapp
Nestjs Bff
A full-stack TypeScript solution, and starter project. Includes an API, CLI, and example client webapp. Features include production grade logging, authorization, authentication, MongoDB migrations, and end-to-end testing.
Stars: ✭ 450 (-52.53%)
Mutual labels:  template, webapp
Next Pwa
Zero config PWA plugin for Next.js, with workbox 🧰
Stars: ✭ 909 (-4.11%)
Mutual labels:  website, webapp
python3-docker-devenv
Docker Start Guide with Python Development Environment
Stars: ✭ 13 (-98.63%)
Mutual labels:  scikit-learn, sklearn
Profanity Check
A fast, robust Python library to check for offensive language in strings.
Stars: ✭ 354 (-62.66%)
Mutual labels:  scikit-learn, sklearn
node-starter-kit
Node.js / GraphQL project template pre-configured with TypeScript, PostgreSQL, login flow, transactional emails, unit tests, CI/CD workflow.
Stars: ✭ 76 (-91.98%)
Mutual labels:  website, webapp
Responsiveframework
Easily make Flutter apps responsive. Automatically adapt UI to different screen sizes. Responsiveness made simple. Demo: https://gallery.codelessly.com/flutterwebsites/minimal/
Stars: ✭ 476 (-49.79%)
Mutual labels:  website, webapp
Hungabunga
HungaBunga: Brute-Force all sklearn models with all parameters using .fit .predict!
Stars: ✭ 614 (-35.23%)
Mutual labels:  scikit-learn, sklearn
Hyperparameter hunter
Easy hyperparameter optimization and automatic result saving across machine learning algorithms and libraries
Stars: ✭ 648 (-31.65%)
Mutual labels:  scikit-learn, sklearn
http-simple-cheatsheet
Simple HTTP status codes cheatsheet πŸ¦„
Stars: ✭ 18 (-98.1%)
Mutual labels:  website, webapp
Image-to-Braille
Give it an image, and it will become unicode braille
Stars: ✭ 140 (-85.23%)
Mutual labels:  website, webapp
Pixiv.moe
😘 A pinterest-style layout site, shows illusts on pixiv.net order by popularity. https://pixiv.moe
Stars: ✭ 259 (-72.68%)
Mutual labels:  website, webapp
englishextra.github.io
English Grammar for Russian-Speakers, a PWA website + SPA
Stars: ✭ 19 (-98%)
Mutual labels:  website, webapp
Documentation Html Template
A Sample Documentation Template for Themes, Templates and Plugins
Stars: ✭ 322 (-66.03%)
Mutual labels:  template, website
Ailearning
AiLearning: ζœΊε™¨ε­¦δΉ  - MachineLearning - ML、深度学习 - DeepLearning - DL、θ‡ͺ焢语言倄理 NLP
Stars: ✭ 32,316 (+3308.86%)
Mutual labels:  scikit-learn, sklearn
skippa
SciKIt-learn Pipeline in PAndas
Stars: ✭ 33 (-96.52%)
Mutual labels:  scikit-learn, sklearn
Mega-index-heroku
Mega nz heroku index, Serves mega.nz to http via heroku web. It Alters downloading speed and stability
Stars: ✭ 165 (-82.59%)
Mutual labels:  website, webapp
Uikit Ecommerce Template
E-commerce template built with UIKIt
Stars: ✭ 453 (-52.22%)
Mutual labels:  template, website

Traingenerator

πŸ§™  A web app to generate template code for machine learning ✨

Gitter Heroku Code style: black



πŸŽ‰ Traingenerator is now live! πŸŽ‰

Try it out:
https://traingenerator.jrieke.com


Generate custom template code for PyTorch & sklearn, using a simple web UI built with streamlit. Traingenerator offers multiple options for preprocessing, model setup, training, and visualization (using Tensorboard or comet.ml). It exports to .py, Jupyter Notebook, or Google Colab. The perfect tool to jumpstart your next machine learning project!


For updates, follow me on Twitter, and if you like this project, please consider sponsoring ☺




Adding new templates

You can add your own template in 4 easy steps (see below), without changing any code in the app itself. Your new template will be automatically discovered by Traingenerator and shown in the sidebar. That's it! 🎈

Want to share your magic? πŸ§™ PRs are welcome! Please have a look at CONTRIBUTING.md and write on Gitter.

Some ideas for new templates: Keras/Tensorflow, Pytorch Lightning, object detection, segmentation, text classification, ...

  1. Create a folder under ./templates. The folder name should be the task that your template solves (e.g. Image classification). Optionally, you can add a framework name (e.g. Image classification_PyTorch). Both names are automatically shown in the first two dropdowns in the sidebar (see image). ✨ Tip: Copy the example template to get started more quickly.
  2. Add a file sidebar.py to the folder (see example). It needs to contain a method show(), which displays all template-specific streamlit components in the sidebar (i.e. everything below Task) and returns a dictionary of user inputs.
  3. Add a file code-template.py.jinja to the folder (see example). This Jinja2 template is used to generate the code. You can write normal Python code in it and modify it (through Jinja) based on the user inputs in the sidebar (e.g. insert a parameter value from the sidebar or show different code parts based on the user's selection).
  4. Optional: Add a file test-inputs.yml to the folder (see example). This simple YAML file should define a few possible user inputs that can be used for testing. If you run pytest (see below), it will automatically pick up this file, render the code template with its values, and check that the generated code runs without errors. This file is optional – but it's required if you want to contribute your template to this repo.

Installation

Note: You only need to install Traingenerator if you want to contribute or run it locally. If you just want to use it, go here.

git clone https://github.com/jrieke/traingenerator.git
cd traingenerator
pip install -r requirements.txt

Optional: For the "Open in Colab" button to work you need to set up a Github repo where the notebook files can be stored (Colab can only open public files if they are on Github). After setting up the repo, create a file .env with content:

GITHUB_TOKEN=<your-github-access-token>
REPO_NAME=<user/notebooks-repo>

If you don't set this up, the app will still work but the "Open in Colab" button will only show an error message.

Running locally

streamlit run app/main.py

Make sure to run always from the traingenerator dir (not from the app dir), otherwise the app will not be able to find the templates.

Deploying to Heroku

First, install heroku and login. To create a new deployment, run inside traingenerator:

heroku create
git push heroku main
heroku open

To update the deployed app, commit your changes and run:

git push heroku main

Optional: If you set up a Github repo to enable the "Open in Colab" button (see above), you also need to run:

heroku config:set GITHUB_TOKEN=<your-github-access-token>
heroku config:set REPO_NAME=<user/notebooks-repo>

Testing

First, install pytest and required plugins via:

pip install -r requirements-dev.txt

To run all tests:

pytest ./tests

Note that this only tests the code templates (i.e. it renders them with different input values and makes sure that the code executes without error). The streamlit app itself is not tested at the moment.

You can also test an individual template by passing the name of the template dir to --template, e.g.:

pytest ./tests --template "Image classification_scikit-learn"

The mage image used in Traingenerator is from Twitter's Twemoji library and released under Creative Commons Attribution 4.0 International Public License.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].