GithubHelp home page GithubHelp logo

jrpespinas / sales-prediction Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 18.9 MB

Develop a single endpoint to predict the sales of a company

License: Apache License 2.0

Dockerfile 0.05% Python 1.38% Shell 0.03% Jupyter Notebook 98.54%
machine-learning-engineering mlops

sales-prediction's Introduction

Sales Prediction

Predict the sales given a set of inputs using only a single endpoint /predict

File Structure

FastAPI

  1. /domain: storage of the Schema
  2. /router: layer for handling requests
  3. /service: the name of the file is adapted from a clean architecture set up wherein the services are where the application and business logic is executed
  4. /tests: consists of both functional and load test

Model Store

  1. /model_store: it stores the latest model
  2. /archive: storage of previously used model to mimic the functionality of versioning models

Data Store

  1. /data_store: stores the training dataset, store details, and unscaled training dataset

Experiments

  1. /experiments: makeshift isolated directory for conducting local testing, normally it should be isolated altogether from the deployment to reduce access of the training notebook and environment
  2. /utils: stores the function for automatically saving the trained model in the Model Store
app
├── __init__.py
├── domain
│   ├── __init__.py
│   └── store.py
├── main.py
├── router
│   ├── __init__.py
│   ├── index.py
│   └── predict.py
├── service
│   ├── __init__.py
│   ├── model_loader.py
│   └── preprocessor.py
└── tests
    ├── __init__.py
    ├── functional_test
    │   ├── __init__.py
    │   ├── test_index.py
    │   └── test_predict.py
    └── load_test
        ├── __init__.py
        └── locustfile.py
        
data_store
├── store.csv
├── train.csv
└── x_train_unscaled.csv

model_store
├── archive
│   ├── sales_prediction_1.joblib
│   └── sales_prediction_2.joblib
└── sales_prediction_3.joblib

experiments
├── Experiment.ipynb
├── sales-prediction.joblib
└── utils
    └── services.py

Basic System Design

Usage

You may the application through heroku

  1. Inference endpoint: https://sales-prediction.herokuapp.com/predict
curl -d '{"Store":1111,"DayOfWeek":4,"Date":"2014-07-10","Customers":410,"Open":1,"Promo":0,"StateHoliday":"0","SchoolHoliday":1}' -H "Content-Type: application/json" -X POST https://sales-prediction.herokuapp.com/predict 
  1. API documentation endpoint: https://sales-prediction.herokuapp.com/docs

References

sales-prediction's People

Contributors

jrpespinas avatar

Watchers

 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.