How I built Defects AI a machine learning service to predict GitHub labels.
Tags: github, machinelearning, startup, saas
Published: 2018-10-15 11:11:38

---
title: How I built Defects AI a machine learning service to predict GitHub labels.
published: true
description: 
tags: github, machine learning, startup, saas
cover_image: https://thepracticaldev.s3.amazonaws.com/i/1txno3em3z33lu798uuq.png
---

[Defects AI](https://www.defects.ai) is a fully automated service to predict labels for GitHub issues, using machine learning models which are trained in particular to that use case. Don’t waste your time on labeling issues, use your it to solve them instead.

![Defects AI in action](https://thepracticaldev.s3.amazonaws.com/i/59ngwrpa1i7pmq1110m1.gif)

##How did everything start?
Defects AI began as a side project for a statistics based tool that provides insights about product quality. While digging deep into different data-sets which were based on varied GitHub repositories, I notices that many of the issues were not labeled.

After a couple of days and talks I realized why: For many projects, it is difficult to analyze issues in an acceptable amount of time.

That was the turning point, I paused working on the statistics tool and started working on the automated issue labeling for GitHub. Starting with the core feature, the machine learning model to predict the GitHub issue type.

A few first successful tests and further improvements of the machine learning model gave me the confidence to continue with that idea.

##How does it work?
The setup is simple, register at Defects AI, install the GitHub Defects AI App and select the repositories which you want to enable for the automatic issue labeling.

Each time when a new issue is created, GitHub sends a request to our server and as a response we send the predicted issue back to your repository. The predicted label is then set automatically on the issue.


##How did I manage to build Defects AI while working full-time?
* Reduced the features to the bare minimum
* Kept my weekends for my family and relaxing
* I usually worked 5 days a week on Defects AI, each day at least 1 hour before my daily job starts.
(You are still responsible to deliver great results to your employer and it is up to you to manage both. If you aren’t capable of combining both, please don’t risk your job)

I spent a bit more than 3 months (95 Days) to build the initial release of Defects AI. To be exact I started on the 15–06–2018. Here is the first commit in the repository:


##What’s next?
While collecting feedback from my user I continue working on [Insights](https://www.defects.ai/feature/insights) and improving the models further. Feel free to follow me on [Twitter](https://twitter.com/HeyerSascha).

Supported currently are the labels: Bug, Feature, Documentation, and Question.


##A few words about money
Like everything else also a SaaS costs money, the biggest expenses are the training costs for the models, hosting and the collaboration tools. I spend around 12$ for each training, as you can imagine in the beginning I trained a lot.

I plan to publish my financial reports each month.

##Curious?

Defects AI provides also a simple and easy way to experiment with the prediction. Just follow the link and start predicting the labels of issues: [Try it out](https://defects.ai/feature/automatic-issue-labeling)


❤ Thank you for having you here. Please feel free to leave any comments if you have questions about building a SaaS, or follow me on Twitter [Twitter](https://twitter.com/HeyerSascha).
I appreciate your feedback which helps me to get inspired for my next posts.


Cheers
Sascha