-
Notifications
You must be signed in to change notification settings - Fork 1
Added ML Model Handling and Prophet model support #13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Logging moved to python rather than yaml Pydantic settings for dealing with environment variables and run configuration.
…n up if configs are empty.
- Exceptions that are expected should be handled, if they can be recovered from. - Exceptions that are not excepted should bubble up. Since they are exceptional cases and will be logged due to the fact that they are raised.
wborn
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I noticed these small issues while checking the changes in IntelliJ.
I'm fine with config files for now but it might be something to add in the future when there is a need for database anyhow. Will everything also be configurable via the API/UI? |
Yes, configs will be able to be created via an UI and via the REST API. Thanks for the review, will make the necessary changes tomorrow. |
Co-authored-by: Wouter Born <github@maindrain.net>
Co-authored-by: Wouter Born <github@maindrain.net>
Co-authored-by: Wouter Born <github@maindrain.net>
…ervice-ml-forecast into prophet-integration
Closes #8
PR adds the following:
Generic configuration schema for ML Models (Pydantic Model)
Extended configuration schema for Prophet Model
ProphetModelProviderSimple provider factory for
ModelProvidercreationtypefield in the config.ModelConfigService– CRUD service for managing model configurations.ModelStorageService– Handles persistence for serialized ML models.OpenRemoteDataService– Abstraction for the OpenRemote Client, with the focus on having a more specific interface that is suitable for the ml forecast service.ModelSchedulerUtility classes
Other changes
Testing
All tests utilize mocked datasets, mocked data retrieval, and various fixtures.

I have also manually tested the scheduling, training and forecasting. I let the service run for roughly 12 hours against a OpenRemote demo instance. No issues occured during this window.

Notes
Stricter validation of the model configuration will be part of the endpoint implementation #14 - Examples are: checking whether the assets are present in the provided realm, regressor has predicted datapoints, timestamps are valid etc.
Acceptance Criteria
Sample Config
{ "id": "d3c119a6-1018-4ebd-932b-a509eb7ab741", "realm": "smartcity", "name": "Power Total Consumers Forecast", "enabled": true, "type": "prophet", "target": { "asset_id": "44ORIhkDVAlT97dYGUD9n5", "attribute_name": "powerTotalConsumers", "cutoff_timestamp": 1716153600000 }, "forecast_interval": "PT1M", "training_interval": "PT2M", "forecast_periods": 96, "forecast_frequency": "1h", "daily_seasonality": true, "weekly_seasonality": true, "yearly_seasonality": true }