Code Monkey home page Code Monkey logo

continuous-intelligence-workshop's Introduction

Continuous Intelligence Workshop

Running Workshop with dvc

  1. Build the pipline
  2. Push the results
  3. Pull and reproduce

Build Pipeline with dvc

dvc run -d src/download_data.py -d gs://continuous-intelligence/store47-2016.csv -o data/raw/store47-2016.csv python src/download_data.py
dvc run -d data/raw/store47-2016.csv -d src/splitter.py -o data/splitter/train.csv -o data/splitter/validation.csv python src/splitter.py
dvc run -d data/splitter/train.csv -d data/splitter/validation.csv -d src/decision_tree.py -o data/decision_tree/model13.pkl -M results/score.txt python src/decision_tree.py

Push the Results

First, push code changes to Github as usual, for instance:

git commit -am "Change model to be more awesome"
git push origin master

Next, push your dvc files to the cloud:

dvc push

That's it! Now anyone with access can fetch this repository and use dvc to replicate and build on your work.

Pull and reproduce changes

First, clone/pull this git repo.

git pull origin master --rebase

Next, pull from the cloud with dvc:

dvc pull

Finally, to reproduce the entire pipeline, simply run:

dvc repro model.pkl.dvc

Here, model.pkl.dvc is the last output in the dvc pipeline. Running it will reproduce all steps.

If you want to change the model, for example, edit the decision_tree.py file as you see fit. Then, you should be able to re-execute the model simply by re-running the pipeline using dvc repro model.pkl.dvc.

Local setup

Build locally and run

Once the model has been trained

docker build . -t ci-workshop

docker run -d -p 5005:5005 ci-workshop

You can view the app at http://localhost:5005

Note: try to assign 8G memory and 2CPU in Docker when running the docker build

Run with existing image

docker pull TBD

docker run -d -p 5005:5005 TBD

continuous-intelligence-workshop's People

Contributors

dtsato avatar gorcenski avatar arifwider avatar

Watchers

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