Page MenuHomePhabricator

Write ORES server role for MediaWiki Vagrant
Closed, ResolvedPublic

Event Timeline

Halfak raised the priority of this task from to Needs Triage.
Halfak updated the task description. (Show Details)
Halfak moved this task to Parked on the Machine-Learning-Team (Active Tasks) board.
Halfak subscribed.
awight renamed this task from Build testing ORES server for MediaWiki vagrant to Write ORES server role for MediaWiki Vagrant.Dec 4 2015, 3:49 AM
awight added a project: MediaWiki-Vagrant.
awight set Security to None.
awight subscribed.

Hi @awight. We just merged https://github.com/wiki-ai/ores/pull/107. Do you know what we need to do to set up this role?

If not, maybe you can direct me to the right docs.

@Halfak
I've written a few vagrant roles and puppet modules, I'd be happy to help with this.

Great!

The default config for the ores dev_server, ores-testwiki.yaml, should work great.

Here's an example of how to use it (assuming you have ORES installed):

$ mkdir projects/Sandbox/test_ores
$ cd projects/Sandbox/test_ores
$ ls
$ wget https://raw.githubusercontent.com/wiki-ai/ores/master/config/ores-testwiki.yaml
--2015-12-09 13:57:46--  https://raw.githubusercontent.com/wiki-ai/ores/master/config/ores-testwiki.yaml
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 23.235.40.133
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|23.235.40.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1572 (1.5K) [text/plain]
Saving to: ‘ores-testwiki.yaml’

100%[===========================================================================================================================>] 1,572       --.-K/s   in 0s      

2015-12-09 13:57:46 (404 MB/s) - ‘ores-testwiki.yaml’ saved [1572/1572]

$ ls
ores-testwiki.yaml
$ ores dev_server --config ores-testwiki.yaml 
2015-12-09 13:58:02,099 INFO:ores.score_processors.score_processor -- Loading ScoreProcessor 'local_timeout' from config.
2015-12-09 13:58:02,100 INFO:ores.score_processors.timeout -- Loading Timeout 'local_timeout' from config.
2015-12-09 13:58:02,106 INFO:ores.scorer.scorer -- Loading ScoringContext 'testwiki' from config.
...

Pulling up http://localhost:8080/scores/testwiki/revid/99/ in your web browser should return:

{
  "99": {
    "prediction": true,
    "probabilities": {
      "false": 0.010000000000000009,
      "true": 0.99
    }
  }
}

This will work with any revision ID, so it should be able to run within vagrant no problem.

Change 259211 had a related patch set uploaded (by Awight):
[WIP] Role for the ORES extension

https://gerrit.wikimedia.org/r/259211

Change 259211 merged by jenkins-bot:
Role for the ORES extension

https://gerrit.wikimedia.org/r/259211