Giter Site home page Giter Site logo

pio-engine-heroku's Introduction

PredictionIO Engine Heroku

Run Locally:

  1. Start Postgres

  2. Set your PredictionIO app's access key and app name in your env vars:

     export ACCESS_KEY=<YOUR ACCESS KEY>
     export APP_NAME=<YOUR APP NAME>
    

    Note: These values come from the apps defined in your event server.

  3. Train the app:

     source bin/env.sh && ./sbt "runMain TrainApp"
    
  4. Start the server:

     source bin/env.sh && ./sbt "runMain ServerApp"
    
  5. Check the status of your engine:

    http://localhost:8000

  6. Check out the recommendations for an item:

    Note: Must be an item that has events

     curl -H "Content-Type: application/json" -d '{ "items": ["i11"], "num": 4 }' -k http://localhost:8000/queries.json
    

Run on Heroku:

  1. Deploy: Deploy on Heroku

  2. Remove the auto-added Heroku Postgres addon:

     heroku addons:destroy heroku-postgresql
    
  3. Attach your PredictionIO Event Server's Postgres:

     heroku addons:attach YOUR-ADDON-ID
    

    Note: You can find out <YOUR-ADDON-ID> by running: heroku addons -a <YOUR EVENT SERVER HEROKU APP NAME>

  4. Configure the Heroku app:

     heroku config:set ACCESS_KEY=<YOUR APP ACCESS KEY> APP_NAME=<APP NAME> EVENT_SERVER_IP=<YOUR EVENT SERVER HOSTNAME> EVENT_SERVER_PORT=80
    
  5. Train the app:

     heroku run train
    
  6. Restart the app to load the new training data:

     heroku restart
    

pio-engine-heroku's People

Contributors

jamesward avatar

Stargazers

Klein avatar Steven Yan avatar Oak avatar Ma Csi avatar Jared Palmer avatar Mars Hall avatar  avatar

Watchers

 avatar James Cloos avatar Oak 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.