demand-forecast-source


Namedemand-forecast-source JSON
Version 1.0.3.17 PyPI version JSON
download
home_pagehttps://github.com/Edipool/DemandForecast
SummaryThis is lib-predicts for demand forecast based on machine learning
upload_time2023-10-16 13:31:13
maintainer
docs_urlNone
authorEduard Poliakov
requires_python
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            Demand Forecast
==============================
## What is the project about?
Products such as electronics, household appliances have varying characteristics and demand cycles. Category managers, responsible for overseeing these items throughout their lifecycle, face challenges in planning purchases, especially when the assortment spans thousands of items. As data volume increases and platform complexity grows, traditional methods of inventory management and demand forecasting become less effective. In response to these challenges, Supermegaretaillite is investing in the development of an automated system, including an ML-based demand forecasting service.
To preserve the primacy of the source code, the SRC module is loaded in [PyPi](https://pypi.org/project/demand-forecast-source) for further use in repositories [training-pipeline](https://github.com/Edipool/Demand_Forecast_Airflow) and inference-pipeline.

## How use this project?
This project is deployed on the server and is fully ready to work 24/7.
If you want to use this service, you need to:
1. Open [this](http://193.222.62.88:8501) web adress
2. For example, you would like to know the demand for the product with sku id 20 for the next 7 days. You should fill in the fields in web service: SKU_ID = 20, Stock = 10, Horizon Days = 7, Confidence Level = 0.90
3. Сlick the buttons:
3.1 "Get how much to order" to find out how much diawara you need to order from the supplier.
3.2 "Get stock level" to find out how much stock you will have in 7 days.
3.3 "Get low stock sku id" to find out which products will be out of stock in 7 days.

## Pipeline this project
![Demand_Forencast_Pipeline.jpg](images/Demand_Forencast_Pipeline.jpg)

## Main tools used
![MLOps](https://img.shields.io/badge/-MLOps-090909?style=for-the-badge&logo=MLOps) ![ML System Design Document](https://img.shields.io/badge/-ML_System_Design-090909?style=for-the-badge&logo=ML_System_Design) ![Streamlit](https://img.shields.io/badge/-Streamlit-090909?style=for-the-badge&logo=Streamlit) ![Fastapi](https://img.shields.io/badge/-Fastapi-090909?style=for-the-badge&logo=Fastapi) ![DVC](https://img.shields.io/badge/-DVC-090909?style=for-the-badge&logo=DVC) ![Amazon S3](https://img.shields.io/badge/-Amazon_S3-090909?style=for-the-badge&logo=Amazon_S3) ![Mlflow](https://img.shields.io/badge/-mlflov-090909?style=for-the-badge&logo=mlflow) ![Docker](https://img.shields.io/badge/-Docker-090909?style=for-the-badge&logo=Docker) ![Docker Compose](https://img.shields.io/badge/-docker_compose-090909?style=for-the-badge&logo=docker_compose) ![Scikit_learn](https://img.shields.io/badge/-Scikit_learn-090909?style=for-the-badge&logo=Scikit_learn) ![Grafana_data](https://img.shields.io/badge/-Grafana_data-090909?style=for-the-badge&logo=Grafana) ![CI/CD](https://img.shields.io/badge/-CI/CD-090909?style=for-the-badge&logo=CI/CD)

## Project Organization
------------

    ├── app.py      <--- FastAPI app
    ├── configs     <--- Configs for this project
    │   └── train_config.yaml
    ├── data    <--- Data for this project
    │   ├── external        <--- External data
    │   ├── interim     <--- Intermediate data that has been transformed
    │   ├── processed       <--- The final, canonical data sets for modeling
    │   │   ├── features_targets.csv  <--- Features and targets for training
    │   │   ├── predictions.csv     <--- Predictions for test data
    │   │   └── sku_demand_day.csv <--- Data for inference
    │   └── raw                <--- The original, immutable data dump
    │       ├── demand_orders.csv  <--- Raw about orders
    │       ├── demand_orders_status.csv <--- Raw about orders status
    │       ├── features.csv
    │       └── sales.csv
    ├── data.dvc              <--- DVC file
    ├── docker-compose.yml  <--- Docker-compose file
    ├── Dockerfile          <--- Dockerfile for this project
    ├── docs    <--- Documentation for this project
    │   └── ML_System_Design.md  <--- ML System Design Document
    ├── dvc.lock
    ├── dvc.yaml
    ├── LICENSE
    ├── logs        <--- Logs for this project
    │   └── app.log
    ├── Makefile
    ├── MANIFEST.in
    ├── models            <--- Models for this project
    │   ├── losses.json  <--- Losses for models
    │   └── model.pkl  <--- Model for inference
    ├── project_structure.txt  <--- This file
    ├── prometheus_data
    │   ├── app_metrics.py
    │   └── prometheus.yml
    ├── README.md
    ├── requirements.txt
    ├── setup.cfg
    ├── setup.py        <--- Setup file for library based on src folder
    ├── src <--- Source code for use in this project
    │   ├── demand_forecast_source  <--- Library for this project
    │   │   ├── data  <--- Source code for data preprocessing
    │   │   │   ├── __init__.py
    │   │   │   └── split_dataset.py  <--- Split dataset
    │   │   ├── download
    │   │   │   ├── download_from_s3.py  <--- Download data from s3
    │   │   │   └── __init__.py
    │   │   ├── entities <--- Entities for this project
    │   │   │   ├── feature_params.py  <--- Params for features
    │   │   │   ├── model_params.py  <--- Params for model
    │   │   │   ├── split_params.py  <--- Params for split
    │   │   │   ├── train_pipeline_params.py  <--- Params for train pipeline
    │   │   │   └── validation_params.py  <--- Params for validation for FastAPI
    │   │   ├── features  <--- Source code for build features for this project
    │   │   │   ├── AddFeatures.py
    │   │   │   ├── AddTargets.py
    │   │   │   ├── build_sku_by_day.py  <--- Build features for sku by day
    │   │   │   ├── build_transformer.py  <--- Build transformer for features
    │   │   │   └── __init__.py
    │   │   ├── inference
    │   │   │   ├── __init__.py
    │   │   │   └── make_request.py   <--- Make request to FastAPI
    │   │   ├── __init__.py
    │   │   ├── models  <--- Source code for models for this project
    │   │   │   ├── __init__.py
    │   │   │   ├── repro_experiments.py  <--- Train model with MLFlow and experiment fixation
    │   │   │   └── train_model.py  <--- Train model without MLFlow
    │   │   └── visualization
    │   │       ├── __init__.py
    │   │       └── visualize.py
    │   └── __init__.py
    ├── tests  <--- Tests for this project
    │   ├── app
    │   │   └── test_streamlit_app.py  <--- Tests for streamlit app
    │   ├── conftest.py  <--- Configs for tests
    │   ├── data  <--- Tests for data module
    │   │   └── test_data.py
    │   └── models  <--- Tests for models module
    ├── tox.ini
    ├── train_pipeline.py  <--- Run train pipeline
    └── web_app  <--- Streamlit app
        ├── Dockerfile  <--- Dockerfile for streamlit app
        ├── __init__.py
        ├── requirements.txt
        └── streamlit_app.py  <--- Source code for streamlit app

--------
            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/Edipool/DemandForecast",
    "name": "demand-forecast-source",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "",
    "author": "Eduard Poliakov",
    "author_email": "ya.polykov@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/cd/4c/06b26ce834d173aeb01e8ec9aae3b824c7fa6cbdee82d701ed2379bbf656/demand_forecast_source-1.0.3.17.tar.gz",
    "platform": null,
    "description": "Demand Forecast\n==============================\n## What is the project about?\nProducts such as electronics, household appliances have varying characteristics and demand cycles. Category managers, responsible for overseeing these items throughout their lifecycle, face challenges in planning purchases, especially when the assortment spans thousands of items. As data volume increases and platform complexity grows, traditional methods of inventory management and demand forecasting become less effective. In response to these challenges, Supermegaretaillite is investing in the development of an automated system, including an ML-based demand forecasting service.\nTo preserve the primacy of the source code, the SRC module is loaded in [PyPi](https://pypi.org/project/demand-forecast-source) for further use in repositories [training-pipeline](https://github.com/Edipool/Demand_Forecast_Airflow) and inference-pipeline.\n\n## How use this project?\nThis project is deployed on the server and is fully ready to work 24/7.\nIf you want to use this service, you need to:\n1. Open [this](http://193.222.62.88:8501) web adress\n2. For example, you would like to know the demand for the product with sku id 20 for the next 7 days. You should fill in the fields in web service: SKU_ID = 20, Stock = 10, Horizon Days = 7, Confidence Level = 0.90\n3. \u0421lick the buttons:\n3.1 \"Get how much to order\" to find out how much diawara you need to order from the supplier.\n3.2 \"Get stock level\" to find out how much stock you will have in 7 days.\n3.3 \"Get low stock sku id\" to find out which products will be out of stock in 7 days.\n\n## Pipeline this project\n![Demand_Forencast_Pipeline.jpg](images/Demand_Forencast_Pipeline.jpg)\n\n## Main tools used\n![MLOps](https://img.shields.io/badge/-MLOps-090909?style=for-the-badge&logo=MLOps) ![ML System Design Document](https://img.shields.io/badge/-ML_System_Design-090909?style=for-the-badge&logo=ML_System_Design) ![Streamlit](https://img.shields.io/badge/-Streamlit-090909?style=for-the-badge&logo=Streamlit) ![Fastapi](https://img.shields.io/badge/-Fastapi-090909?style=for-the-badge&logo=Fastapi) ![DVC](https://img.shields.io/badge/-DVC-090909?style=for-the-badge&logo=DVC) ![Amazon S3](https://img.shields.io/badge/-Amazon_S3-090909?style=for-the-badge&logo=Amazon_S3) ![Mlflow](https://img.shields.io/badge/-mlflov-090909?style=for-the-badge&logo=mlflow) ![Docker](https://img.shields.io/badge/-Docker-090909?style=for-the-badge&logo=Docker) ![Docker Compose](https://img.shields.io/badge/-docker_compose-090909?style=for-the-badge&logo=docker_compose) ![Scikit_learn](https://img.shields.io/badge/-Scikit_learn-090909?style=for-the-badge&logo=Scikit_learn) ![Grafana_data](https://img.shields.io/badge/-Grafana_data-090909?style=for-the-badge&logo=Grafana) ![CI/CD](https://img.shields.io/badge/-CI/CD-090909?style=for-the-badge&logo=CI/CD)\n\n## Project Organization\n------------\n\n    \u251c\u2500\u2500 app.py      <--- FastAPI app\n    \u251c\u2500\u2500 configs     <--- Configs for this project\n    \u2502\u00a0\u00a0 \u2514\u2500\u2500 train_config.yaml\n    \u251c\u2500\u2500 data    <--- Data for this project\n    \u2502\u00a0\u00a0 \u251c\u2500\u2500 external        <--- External data\n    \u2502\u00a0\u00a0 \u251c\u2500\u2500 interim     <--- Intermediate data that has been transformed\n    \u2502\u00a0\u00a0 \u251c\u2500\u2500 processed       <--- The final, canonical data sets for modeling\n    \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u251c\u2500\u2500 features_targets.csv  <--- Features and targets for training\n    \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u251c\u2500\u2500 predictions.csv     <--- Predictions for test data\n    \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u2514\u2500\u2500 sku_demand_day.csv <--- Data for inference\n    \u2502\u00a0\u00a0 \u2514\u2500\u2500 raw                <--- The original, immutable data dump\n    \u2502\u00a0\u00a0     \u251c\u2500\u2500 demand_orders.csv  <--- Raw about orders\n    \u2502\u00a0\u00a0     \u251c\u2500\u2500 demand_orders_status.csv <--- Raw about orders status\n    \u2502\u00a0\u00a0     \u251c\u2500\u2500 features.csv\n    \u2502\u00a0\u00a0     \u2514\u2500\u2500 sales.csv\n    \u251c\u2500\u2500 data.dvc              <--- DVC file\n    \u251c\u2500\u2500 docker-compose.yml  <--- Docker-compose file\n    \u251c\u2500\u2500 Dockerfile          <--- Dockerfile for this project\n    \u251c\u2500\u2500 docs    <--- Documentation for this project\n    \u2502\u00a0\u00a0 \u2514\u2500\u2500 ML_System_Design.md  <--- ML System Design Document\n    \u251c\u2500\u2500 dvc.lock\n    \u251c\u2500\u2500 dvc.yaml\n    \u251c\u2500\u2500 LICENSE\n    \u251c\u2500\u2500 logs        <--- Logs for this project\n    \u2502\u00a0\u00a0 \u2514\u2500\u2500 app.log\n    \u251c\u2500\u2500 Makefile\n    \u251c\u2500\u2500 MANIFEST.in\n    \u251c\u2500\u2500 models            <--- Models for this project\n    \u2502\u00a0\u00a0 \u251c\u2500\u2500 losses.json  <--- Losses for models\n    \u2502\u00a0\u00a0 \u2514\u2500\u2500 model.pkl  <--- Model for inference\n    \u251c\u2500\u2500 project_structure.txt  <--- This file\n    \u251c\u2500\u2500 prometheus_data\n    \u2502\u00a0\u00a0 \u251c\u2500\u2500 app_metrics.py\n    \u2502\u00a0\u00a0 \u2514\u2500\u2500 prometheus.yml\n    \u251c\u2500\u2500 README.md\n    \u251c\u2500\u2500 requirements.txt\n    \u251c\u2500\u2500 setup.cfg\n    \u251c\u2500\u2500 setup.py        <--- Setup file for library based on src folder\n    \u251c\u2500\u2500 src <--- Source code for use in this project\n    \u2502\u00a0\u00a0 \u251c\u2500\u2500 demand_forecast_source  <--- Library for this project\n    \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u251c\u2500\u2500 data  <--- Source code for data preprocessing\n    \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u251c\u2500\u2500 __init__.py\n    \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u2514\u2500\u2500 split_dataset.py  <--- Split dataset\n    \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u251c\u2500\u2500 download\n    \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u251c\u2500\u2500 download_from_s3.py  <--- Download data from s3\n    \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u2514\u2500\u2500 __init__.py\n    \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u251c\u2500\u2500 entities <--- Entities for this project\n    \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u251c\u2500\u2500 feature_params.py  <--- Params for features\n    \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u251c\u2500\u2500 model_params.py  <--- Params for model\n    \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u251c\u2500\u2500 split_params.py  <--- Params for split\n    \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u251c\u2500\u2500 train_pipeline_params.py  <--- Params for train pipeline\n    \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u2514\u2500\u2500 validation_params.py  <--- Params for validation for FastAPI\n    \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u251c\u2500\u2500 features  <--- Source code for build features for this project\n    \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u251c\u2500\u2500 AddFeatures.py\n    \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u251c\u2500\u2500 AddTargets.py\n    \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u251c\u2500\u2500 build_sku_by_day.py  <--- Build features for sku by day\n    \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u251c\u2500\u2500 build_transformer.py  <--- Build transformer for features\n    \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u2514\u2500\u2500 __init__.py\n    \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u251c\u2500\u2500 inference\n    \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u251c\u2500\u2500 __init__.py\n    \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u2514\u2500\u2500 make_request.py   <--- Make request to FastAPI\n    \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u251c\u2500\u2500 __init__.py\n    \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u251c\u2500\u2500 models  <--- Source code for models for this project\n    \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u251c\u2500\u2500 __init__.py\n    \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u251c\u2500\u2500 repro_experiments.py  <--- Train model with MLFlow and experiment fixation\n    \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u2514\u2500\u2500 train_model.py  <--- Train model without MLFlow\n    \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u2514\u2500\u2500 visualization\n    \u2502\u00a0\u00a0 \u2502\u00a0\u00a0     \u251c\u2500\u2500 __init__.py\n    \u2502\u00a0\u00a0 \u2502\u00a0\u00a0     \u2514\u2500\u2500 visualize.py\n    \u2502\u00a0\u00a0 \u2514\u2500\u2500 __init__.py\n    \u251c\u2500\u2500 tests  <--- Tests for this project\n    \u2502\u00a0\u00a0 \u251c\u2500\u2500 app\n    \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u2514\u2500\u2500 test_streamlit_app.py  <--- Tests for streamlit app\n    \u2502\u00a0\u00a0 \u251c\u2500\u2500 conftest.py  <--- Configs for tests\n    \u2502\u00a0\u00a0 \u251c\u2500\u2500 data  <--- Tests for data module\n    \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u2514\u2500\u2500 test_data.py\n    \u2502\u00a0\u00a0 \u2514\u2500\u2500 models  <--- Tests for models module\n    \u251c\u2500\u2500 tox.ini\n    \u251c\u2500\u2500 train_pipeline.py  <--- Run train pipeline\n    \u2514\u2500\u2500 web_app  <--- Streamlit app\n        \u251c\u2500\u2500 Dockerfile  <--- Dockerfile for streamlit app\n        \u251c\u2500\u2500 __init__.py\n        \u251c\u2500\u2500 requirements.txt\n        \u2514\u2500\u2500 streamlit_app.py  <--- Source code for streamlit app\n\n--------",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "This is lib-predicts for demand forecast based on machine learning",
    "version": "1.0.3.17",
    "project_urls": {
        "Homepage": "https://github.com/Edipool/DemandForecast"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "cd4c06b26ce834d173aeb01e8ec9aae3b824c7fa6cbdee82d701ed2379bbf656",
                "md5": "1701bbea350909ee475dc698ef4ec211",
                "sha256": "81be6ab084949f4ecd3650bd5f137b0ba3cca32ccfe92b4600f2b90d1cb4593f"
            },
            "downloads": -1,
            "filename": "demand_forecast_source-1.0.3.17.tar.gz",
            "has_sig": false,
            "md5_digest": "1701bbea350909ee475dc698ef4ec211",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 25221,
            "upload_time": "2023-10-16T13:31:13",
            "upload_time_iso_8601": "2023-10-16T13:31:13.606279Z",
            "url": "https://files.pythonhosted.org/packages/cd/4c/06b26ce834d173aeb01e8ec9aae3b824c7fa6cbdee82d701ed2379bbf656/demand_forecast_source-1.0.3.17.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-10-16 13:31:13",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Edipool",
    "github_project": "DemandForecast",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "tox": true,
    "lcname": "demand-forecast-source"
}
        
Elapsed time: 0.15944s