Rui Quintino
Oct 10, 2018 · 4 min read

A quick walkthrough of how we’ve put this together for DSPT Day awesome event.

Note: Only code needed is for the python train/eval function (running as a containeirized azure web app). Everything else we used mostly Microsoft Forms, Logic Apps & Power BI designers.

As far as I know this was the first online & realtime “no code mobile based” machine learning competition!

Thank Sandro Pereira for all the tips & guidance on Logic Apps & amazing DevScope BI team (Bruno Ferreira/Ricardo Linhares) for the much welcome touches on Power BI dashboard.

Final Competition Leaderboard

ps-Congrats Darya! & thanks everyone for participating and being at DSPT Day

Final Leaderboard

Code Link

Python code for model training, called from Logic App http connector is at: https://github.com/DevScope/ai-lab/tree/master/notebooks/dsptday-ml-competition

Microsoft Forms ML Model Submission

Only complex issue was to use branching to allow specific parameters for each algorithm.

Branching options
Dont know if there was a better way to map Ids… (because we used full body in Logic Apps)
mapping form question ids to sklearn parameters

Preview Submission Form

Mobile View

Other settings in Microsoft Forms

Azure Logic App

Rather simple app, only detail was to use full body from response details step, allowing several form changes without having to go back to Logic App designer (all mapping done in python flask app with Jupyter)

As a backup, submissions were also sent to Azure SQL db and OneDrive folder.

Calling our Python train/eval function

Azure SQL/OneDrive Submissions Backup

Sending to PowerBI Streaming dataset

Python Web App (train/KFold eval)

Main tutorial for setting up/publishing azure python web app (https://docs.microsoft.com/en-us/azure/app-service/containers/quickstart-python)
remote git used for pushing changes and automatically azure web app update
(worked amazingly well, as long as you don’t change requirements, container image is reused, just new code is pushed).

Used startup.txt file like this to allow for multiple python workers (4), otherwise will default to one and serialize requests, not good.

During the competition we configured auto scale up on azure web apps, between 1 and P3v2 4 nodes max.

We also used Azure redis cache to avoid retraining same pipelines more than needed (also prepopulated pipeline cache with a timely “pre-DSPT Day” DevScope team challenge :) ).

Power BI Realtime dashboard

We had lots of issues with realtime and tables failing to refresh, so we just used multi cards instead. Worked whole day without failing I must say.

Power BI streaming dataset

That’s it, should be easy to setup your own no code ml competition now!

RQ

DevScope AI Blog

DevScope Artificial Intelligence, Data Science & Machine Learning

Rui Quintino

Written by

DevScope AI Blog

DevScope Artificial Intelligence, Data Science & Machine Learning

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade