Inspiration


Machine Learning is in itself a daunting task. Preprocessing the data, getting the accuracies right; it's already too much! Add creating model API, unit-testing, or dockerizing to this already complex process, and things might start looking scary, especially for someone who isn't exactly from a programming background. Not-so-fun-fact: 90% of the ML models never make it to the deployment for this exact same reason!

Our Solution


TorchBlaze is a CLI-based, pip-installable Python package that provides a suite of functionalities to perform end-to-end ML using PyTorch.

Here's what you can do with our developer tool:

  • Flask-API Template: Set up the basic PyTorch project structure and an easily tweakable flask-RESTful API with a single CLI command. Deploying your ML models has never been so easy.

  • ML Model Test Suite: The package comes with a built-in test suite that evaluates your PyTorch models over a series of unit-tests to look for any errors that otherwise might not be traceable easily.

  • Test ML API: Once you have set up your API, test all the API end-points to ensure you get the expected results before pushing your API to deployment.

  • Dockerizing: A simplified, single-command, easy dockerization for your ML API.

How we built it


TorchBlaze was the result of countless hours of hard-work and effective communication by the team. We followed all the possible GitHub best-practices to develop the project over a period of 3 weeks. The package was primarily developed using Python+PyTorch. We used Docusaurus for making the documentation website, and GitHub Actions to implement CI/CD to ensure a streamlined development and build deployments.

Challenges we ran into


During the project, we ran into a couple of challenges.

  • Firstly, we hadn't developer a command-line tool, or a package with multiple functionalities before, so it was something completely new.
  • Secondly, since we were working on template generation with our project, relative paths were something that was repeatedly breaking the code.
  • Model unit-testing was something that was a big challenge, as none of the team members had done any sort of that thing before. We actually had to do a lot of research and reading to implement that part.
  • None of the team members had worked on CI/CD before. So that was completely different for us.

Similarly, there were endless other bugs that kept breaking the code during our development journey.

Accomplishments that we're proud of


  • We started with just wild thoughts, many of which seemed too complicated to implement, but we were actually able to put together something that is going to benefit ML developers around the world.
  • We got to learn so many things during the hackathon!

What we learned


  • Creating a CLI with Python
  • Creating a Python package
  • Unit testing in Python
  • Docker
  • Developing and deploying a website quickly using Docusaurus
  • CI/CD
  • GitHub Actions
  • How to effectively use GitHub in a team-setup.

What's next for TorchBlaze


  • Promoting TorchBlaze in the developer community so that people can benefit to it, and the interested ones can contribute/build on top of it.
  • Extending support for deployment on GCP, AWS, etc.
  • Implementing more robust unit-tests in the TorchBlaze MLTests module.
  • Adding an interactive version of the CLI, so that developers can use the tool more effectively.
  • Improving the documentation, and adding more code examples to it.

Built With

Share this project:

Updates