Giter Site home page Giter Site logo

oppia-ml's Introduction

Oppia-ml

Oppia-ml is a supplementary component which is used with Oppia for training machine learning models on a separate VM instance. Oppia puts job requests for training a classifier in database. Oppia-ml picks this job requests one by one, trains classifier for these requests and stores the result of training back into database. Oppia uses this stored results to predict outcome for answers.

Oppia-ml is written in Python and uses various machine learning libraries for creating classifiers.

Installation

Installing on your development machine

  1. Clone this repo in folder oppia-ml.

  2. Open terminal and navigate to oppia-ml folder and run:

  git checkout develop
  bash scripts/start.sh

Deploying Oppia-ml on VM instance

  1. Clone this repo in oppia-ml folder of your VM instance:
  git clone https://github.com/oppia/oppia-ml.git
  1. Install Supervisor on VM instance. Generally it can be installed by running simple pip command. You need superuser privileges to install it on VM. if this command does not work then follow instructions on official installation page.
  pip install supervisor
  1. Navigate to oppia-ml folder in terminal and run following commands:
  bash scripts/deploy.sh
  1. Add shared secret key in VM and in Oppia for secure communication.
  • Shared key on VM is added using GCE metadata. Select the VM instance in the GCP panel, then add two key - value pairs in metadata, one for shared_secret_key and other is vm_id. VM will automatically get the ID and secret from metadata.
  • Shared key on Oppia can be added by going to /admin page of your Oppia host. On this page go to the 'Config' tab where there will be one section for VMID and shared secret keys in which one can add as many vm_id and shared_secret_key as needed.

Support

If you have any feature requests or bug reports, please log them on our issue tracker.

Please report security issues directly to [email protected].

Licence

The Oppia-ml code is released under the Apache v2 license.

oppia-ml's People

Contributors

akumar1503 avatar anmolshkl avatar prasanna08 avatar rohitkatlaa avatar seanlip avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

oppia-ml's Issues

Implement text input classifier

Implement classifier for text input interaction. This classifier takes raw strings in the input and trains a model which can predict the answer group for unseen text input.

Implement polling and save data functions

  • Implement polling function which will poll jobs from Oppia and train them.
  • Implement sava data function which will store the result of trained jobs back to
  • Incorporate logging module to display log.

Update README file

Update README file and add following information:

  1. General description of oppia-ml
  2. Installtion (local + production)
  3. Contributing
  4. Support
  5. Licence

Research and implement code classifier

Implement classifier for code interaction. This classifier takes python programs in the input and generates a model which can predict the answer group for unseen python program.

Move all CI tests to GitHub Actions

As of now, Oppia-ml has two CI checks: (1) Lint (2) Backend tests. These tests are run on Travis. However, due to limited resources availability on Travis, checks take long time to execute as they spend most of their time being Queued, whereas tests themselves only take a couple of minutes. Hence, these should be moved to GitHub actions to avoid unnecessary delays.

Implement main worker process.

  • Implement main worker process which will poll <--> train <--> save job requests. The main worker process is same as polling (as described in doc) process of VM.
  • Implement algorithm_registry for algorithm_id <--> classifier mapping.
  • Incorporate logging module to display log.

Add necessary directory structure and startup scripts.

Create necessary directory structure (which should resemble to Oppia's directory structure).
Create following files / scripts:

  1. start.sh: to start oppia-ml locally
  2. install_third_party.sh: to install 3rd party libraies in "third_party" folder.
  3. deploy.sh: to deploy oppia-ml in production env.
  4. supervisord.conf: configuration file which will be used by Supervisor.
  5. vmconf.py: similar to feconf.py file of Oppia. Contains various constants and configuration parameters of oppia-ml.

Implement necessary functions for remote communication

  • Implement fetch_next_job_request() and store_trained_classifier function for retrieving and storing job requests and result of job requests, respectively.
  • Implement gce_metadata_services so that vm_id and shared_secret_key can be retrieved at run-time in production environment.
  • Implement generate_signature() function for secure communication between VM and Oppia.
  • Add constants required by above functions in vmconf.py file.

Fix metadata platform services.

The metadata services defined for GCE platform are not working as of now. We have to investigate this issue and find a working method with the help of actual GCE instance. Currently, @anmolshkl is investigating and testing with GCE instance.

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.