Add models and complete forecasting service#2
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces significant updates to the forecasting system, including enhancements to the feature pipeline, the forecasting logic, and the API endpoints. The changes improve the system's functionality, scalability, and accuracy. Below is a summary of the most important changes, grouped by theme:
Forecasting Logic Enhancements
forecast_for_productinforecast_runner.pyto support SKU-based forecasting, include error handling for missing models, and calculate average, maximum, and minimum forecasts with confidence intervals. It now also supports a configurable number of forecast days.get_current_stockinutils/warehouse_api.pyto use hardcoded stock values for different SKUs instead of relying on an external API, improving reliability for testing.Feature Pipeline Improvements
prepare_featuresinpipeline.pyto enrich the feature set with seasonal and weekend indicators, improving forecast accuracy. Seasonal data is one-hot encoded for better model input.API and Routing Updates
forecast_viewendpoint inviews.pyto handle POST requests for forecasting, acceptingproduct_SKUanddaysas inputs.urls.pyto include the new/forecast/endpoint.Documentation Updates
README.mdto reflect the switch fromproduct_nametoproduct_SKUin API requests and responses, and removed outdated linting and best practices section. [1] [2] [3]