GSoC’20 Phase-2 @ OWASP-IIDS

Ashish Malik
3 min readJul 28, 2020
source

Hey Everyone,

It’s been a month since the start of phase-2. Phase-1 was more research oriented, but phase-2 mostly consisted of coding. During this phase, I had to deploy my machine learning models on Django REST API.

The main purpose of deployment was to productionize the models. This was done to prevent writing of those models repetitively, which was time-consuming. Productionizing models means that we would be using those models in real world application, instead of just saving/storing in Jupyter notebooks.

“All models are wrong, but some are useful.” — George Box

Me and my mentor were inspired by the RASA , which is an open-source machine learning framework to automate text- and voice-based assistants. So, we decided to create an application which would call those models using Django REST API. The user would configure the model to be used and its parameters in a JSON file and then proceed to call the endpoints.

So coming back to the progress, I went through various blogs related to deployment of these models and started creating the REST API. As mentioned above, I would be using Django for its deployment, but there are also some different ways to deploy it like by using using Docker and AWS services like ECR, Sagemaker and Lambda or by simply using Flask. By building a REST API for these models, I could keep my code separate from other developers.

ML Algos

The accuracy of machine learning algorithms depends on the bias added by humans which in turn depends on the dataset. In short, the accuracy of these models also depends on the dataset. As in our project, the user can upload different datasets, the accuracy of a single model may get varied. This is why, we are deploying a number of machine learning algorithms as well as some neural networks, so that the user can choose their model depending on their dataset.

Neural nets

After this process, I started with the creation of endpoint serialiazer for serializing inputs from JSON. Then I had to make all the necessary changes in views.py in Django app.

And.. thats it for the 2nd phase. Now I would be moving to the 3rd and the Final phase of GSoC. I would have to make all the remaining changes in code, fix few bugs and then start documentating the project. Stay tuned for the next post!

Until Next Time…

--

--

Ashish Malik

GS0C’21 @ Casbin, GSoC'20 @ OWASP, Backend-Dev, Security