GithubHelp home page GithubHelp logo

wikimedia / research-article-recommender-deploy Goto Github PK

View Code? Open in Web Editor NEW
0.0 16.0 0.0 18 KB

Github mirror of "research/article-recommender/deploy" - our actual code is hosted with Gerrit (please see https://www.mediawiki.org/wiki/Developer_access for contributing)

Python 88.49% Shell 11.51%

research-article-recommender-deploy's Introduction

Importing Wikidata item normalized ranks to MySQL

Requirements

On Debian: python-mysql.connector

How to import data

Test data can be found here.

Assuming TSV files are in the current directory, run the following commands in order:

  1. Import languages (recommendationapi_password.txt must contain the MySQL password for the user ‘recommendationapi’):

    python deploy.py import_languages 20181130 m2-master.eqiad.wmnet \ 3306 recommendationapi recommendationapi recommendationapi_password.txt \ –language_file languages.tsv

  2. Import normalized ranks (make sure to change the source and target languages when importing other files):

    python deploy.py import_normalized_ranks 20181130 m2-master.eqiad.wmnet \ 3306 recommendationapi recommendationapi recommendationapi_password.txt \ –normalized_ranks_file predictions-06032018-20181130/en-es.tsv \ –source_language en –target_language es

  3. Create views so that the recommendation API can access the data:

    python deploy.py create_views 20181130 m2-master.eqiad.wmnet \ 3306 recommendationapi recommendationapi recommendationapi_password.txt

    (This doesn’t always work. TODO: fix)

  4. Optional. If you want to delete old data:

    python deploy.py cleanup 20181130 m2-master.eqiad.wmnet \ 3306 recommendationapi recommendationapi recommendationapi_password.txt

Prepare environment for Oozie

  • Ssh stat1007 so that you get the same version of python that the cluster has (is that true?)
  • ./bin/create-environment.sh
  • Copy over the generated zip file to the `artifacts` folder of analytics/refinery.

research-article-recommender-deploy's People

Contributors

somechris avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.