Git Product home page Git Product logo

stock's Introduction

Experiment with predicting stock prices using Long Short-Term Memory (LSTM)

Prerequisites

  • An Openshift 4.11+ cluster
  • The Pipelines Operator
  • The oc and tkn command line tools (See the question mark menu in the Openshift UI)
  • An Openshift project to work with

Files and directories

├── src                             Python source for data ingestion and model training
├── pipelines                       Tekton pipeline and tasks 
├── data                            Sample data
├── notebooks                       Jupyter experimentation
└── requirements.txt                Python dependencies

Pipeline example

cd pipelines

Apply the custom tasks and pipeline resources.

oc apply -f pipelines/01-ingest-train-task.yaml
oc apply -f pipelines/02-ingest-train-pipeline.yaml

Create a PVC

-> Use the Openshift UI to manually create a storage persistent volume claim (PVC) and pass its name in when starting the pipeline below.

Start a pipeline run

tkn pipeline start ingest-and-train -w name=shared-workspace,claimName=my-pipeline-claim-01 -p deployment-name=ingest-and-train -p git-url=https://github.com/bkoz/stock.git -p IMAGE='image-registry.openshift-image-registry.svc:5000/$(context.pipelineRun.namespace)/ingest-and-train' --use-param-defaults

-> Optional: Auto-create a pvc when starting the pipeline.

This requires further investigation as the PVCs don't get deleted when the pipeline gets deleted.

tkn pipeline start ingest-and-train -w name=shared-workspace,volumeClaimTemplateFile=00-persistent-volume-claim.yaml -p deployment-name=ingest-and-train -p git-url=https://github.com/bkoz/stock.git -p IMAGE='image-registry.openshift-image-registry.svc:5000/$(context.pipelineRun.namespace)/ingest-and-train' --use-param-defaults

TODOs

  • Integrate s3 storage into the ingest and training tasks.
    • Ingest the csv file from s3 vs. the yahoo finance service.
    • Save the trained model artifact to s3 storage so the Triton server can find it.

References

Data streamer sample

Custom Notebook Builder

Pipeline examples

stock's People

Contributors

bkoz avatar

Watchers

 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.