Page MenuHomePhabricator

Create a tutorial for deploying a model on toolforge
Open, Needs TriagePublic

Description

In preparation for putting ORES in maintenance mode while we complete the Lift-Wing MVP, we should create a tutorial that shows how to deploy a model on Toolforge .

This would provide an alternative for folks who do not want to wait or work through our team to deploy community models.

There was some work done in T265066, although we feel toolforge is better suited for community models at this time.

Here is a good tutorial for making a python app on toolforge:
https://wikitech.wikimedia.org/wiki/Help:Toolforge/My_first_Flask_OAuth_tool

Also a good example of a simple model server that could be used in the tutorial:
https://github.com/chrisalbon/sklearn-flask-docker

Deliverables:

  • A running model on toolforge
  • Instructions on Wikitech for deploying a similar model

Event Timeline

FYI -- Research has two templates for this that might be of use:

  • API on Cloud VPS: https://github.com/wikimedia/research-api-endpoint-template
    • The Cloud VPS component may be less useful to community members (as onboarding/permissions take more time) but the underlying Flask app code was initially built with Toolforge in mind. I glanced at Chris' docker example and that looks great too. My only suggestions would be to allow CORS as that's a common headache w/ "why is my API not working?" and perhaps add some basic examples of validating/normalizing values passed via URL parameters (where common parameters would be pageid, pagetitle, qid, language, username, and I'm sure a few others)
    • I also have had a really good experience with Flask and found it quite good for building simple apps. On Cloud VPS, we've also gotten a node backend and Go server backend) working too.
  • API Interface on Toolforge (this has a bunch of Research branding in it but that could always be removed): https://github.com/wikimedia/research-api-interface-template
    • The interface obviously isn't required but I think having a good template promotes transparency (source code, documentation, who to contact, what logging is happening if any, etc.) and making it far easier for users to test out the API.