openstef 3.4.17__tar.gz → 3.4.19__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {openstef-3.4.17 → openstef-3.4.19}/PKG-INFO +29 -35
- {openstef-3.4.17 → openstef-3.4.19}/README.md +27 -34
- openstef-3.4.19/openstef/app_settings.py +19 -0
- {openstef-3.4.17 → openstef-3.4.19}/openstef/exceptions.py +1 -1
- {openstef-3.4.17 → openstef-3.4.19}/openstef/feature_engineering/data_preparation.py +7 -0
- {openstef-3.4.17 → openstef-3.4.19}/openstef/feature_engineering/general.py +14 -0
- {openstef-3.4.17 → openstef-3.4.19}/openstef/feature_engineering/weather_features.py +7 -0
- {openstef-3.4.17 → openstef-3.4.19}/openstef/metrics/reporter.py +7 -0
- {openstef-3.4.17 → openstef-3.4.19}/openstef/model/confidence_interval_applicator.py +7 -0
- {openstef-3.4.17 → openstef-3.4.19}/openstef/model/model_creator.py +7 -0
- {openstef-3.4.17 → openstef-3.4.19}/openstef/model/serializer.py +7 -0
- {openstef-3.4.17 → openstef-3.4.19}/openstef/monitoring/teams.py +11 -0
- {openstef-3.4.17 → openstef-3.4.19}/openstef/pipeline/create_basecase_forecast.py +7 -0
- {openstef-3.4.17 → openstef-3.4.19}/openstef/pipeline/create_component_forecast.py +8 -1
- {openstef-3.4.17 → openstef-3.4.19}/openstef/pipeline/create_forecast.py +8 -0
- {openstef-3.4.17 → openstef-3.4.19}/openstef/pipeline/optimize_hyperparameters.py +8 -1
- {openstef-3.4.17 → openstef-3.4.19}/openstef/pipeline/train_model.py +6 -2
- {openstef-3.4.17 → openstef-3.4.19}/openstef/postprocessing/postprocessing.py +7 -0
- openstef-3.4.19/openstef/settings.py +15 -0
- {openstef-3.4.17 → openstef-3.4.19}/openstef/tasks/calculate_kpi.py +14 -6
- {openstef-3.4.17 → openstef-3.4.19}/openstef/tasks/create_components_forecast.py +7 -0
- {openstef-3.4.17 → openstef-3.4.19}/openstef/tasks/split_forecast.py +7 -0
- {openstef-3.4.17 → openstef-3.4.19}/openstef/tasks/utils/taskcontext.py +7 -0
- {openstef-3.4.17 → openstef-3.4.19}/openstef/validation/validation.py +22 -0
- {openstef-3.4.17 → openstef-3.4.19}/openstef.egg-info/PKG-INFO +29 -35
- {openstef-3.4.17 → openstef-3.4.19}/openstef.egg-info/SOURCES.txt +2 -0
- {openstef-3.4.17 → openstef-3.4.19}/openstef.egg-info/requires.txt +1 -0
- {openstef-3.4.17 → openstef-3.4.19}/setup.py +1 -1
- {openstef-3.4.17 → openstef-3.4.19}/LICENSE +0 -0
- {openstef-3.4.17 → openstef-3.4.19}/openstef/__init__.py +0 -0
- {openstef-3.4.17 → openstef-3.4.19}/openstef/__main__.py +0 -0
- {openstef-3.4.17 → openstef-3.4.19}/openstef/data/dazls_model_3.4.7/dazls_stored_3.4.7_adaptation_model.z +0 -0
- {openstef-3.4.17 → openstef-3.4.19}/openstef/data/dazls_model_3.4.7/dazls_stored_3.4.7_adaptation_model.z.license +0 -0
- {openstef-3.4.17 → openstef-3.4.19}/openstef/data/dazls_model_3.4.7/dazls_stored_3.4.7_adaptation_model_features.z +0 -0
- {openstef-3.4.17 → openstef-3.4.19}/openstef/data/dazls_model_3.4.7/dazls_stored_3.4.7_adaptation_model_features.z.license +0 -0
- {openstef-3.4.17 → openstef-3.4.19}/openstef/data/dazls_model_3.4.7/dazls_stored_3.4.7_adaptation_model_scaler.z +0 -0
- {openstef-3.4.17 → openstef-3.4.19}/openstef/data/dazls_model_3.4.7/dazls_stored_3.4.7_adaptation_model_scaler.z.license +0 -0
- {openstef-3.4.17 → openstef-3.4.19}/openstef/data/dazls_model_3.4.7/dazls_stored_3.4.7_domain_model.z +0 -0
- {openstef-3.4.17 → openstef-3.4.19}/openstef/data/dazls_model_3.4.7/dazls_stored_3.4.7_domain_model.z.license +0 -0
- {openstef-3.4.17 → openstef-3.4.19}/openstef/data/dazls_model_3.4.7/dazls_stored_3.4.7_domain_model_features.z +0 -0
- {openstef-3.4.17 → openstef-3.4.19}/openstef/data/dazls_model_3.4.7/dazls_stored_3.4.7_domain_model_features.z.license +0 -0
- {openstef-3.4.17 → openstef-3.4.19}/openstef/data/dazls_model_3.4.7/dazls_stored_3.4.7_domain_model_scaler.z +0 -0
- {openstef-3.4.17 → openstef-3.4.19}/openstef/data/dazls_model_3.4.7/dazls_stored_3.4.7_domain_model_scaler.z.license +0 -0
- {openstef-3.4.17 → openstef-3.4.19}/openstef/data/dazls_model_3.4.7/dazls_stored_3.4.7_model_card.md +0 -0
- {openstef-3.4.17 → openstef-3.4.19}/openstef/data/dazls_model_3.4.7/dazls_stored_3.4.7_model_card.md.license +0 -0
- {openstef-3.4.17 → openstef-3.4.19}/openstef/data/dazls_model_3.4.7/dazls_stored_3.4.7_target.z +0 -0
- {openstef-3.4.17 → openstef-3.4.19}/openstef/data/dazls_model_3.4.7/dazls_stored_3.4.7_target.z.license +0 -0
- {openstef-3.4.17 → openstef-3.4.19}/openstef/data/dazls_model_3.4.7/dazls_stored_3.4.7_target_scaler.z +0 -0
- {openstef-3.4.17 → openstef-3.4.19}/openstef/data/dazls_model_3.4.7/dazls_stored_3.4.7_target_scaler.z.license +0 -0
- {openstef-3.4.17 → openstef-3.4.19}/openstef/data/dutch_holidays_2020-2022.csv +0 -0
- {openstef-3.4.17 → openstef-3.4.19}/openstef/data/dutch_holidays_2020-2022.csv.license +0 -0
- {openstef-3.4.17 → openstef-3.4.19}/openstef/data/pv_single_coefs.csv +0 -0
- {openstef-3.4.17 → openstef-3.4.19}/openstef/data/pv_single_coefs.csv.license +0 -0
- {openstef-3.4.17 → openstef-3.4.19}/openstef/data_classes/__init__.py +0 -0
- {openstef-3.4.17 → openstef-3.4.19}/openstef/data_classes/data_prep.py +0 -0
- {openstef-3.4.17 → openstef-3.4.19}/openstef/data_classes/model_specifications.py +0 -0
- {openstef-3.4.17 → openstef-3.4.19}/openstef/data_classes/prediction_job.py +0 -0
- {openstef-3.4.17 → openstef-3.4.19}/openstef/data_classes/split_function.py +0 -0
- {openstef-3.4.17 → openstef-3.4.19}/openstef/enums.py +0 -0
- {openstef-3.4.17 → openstef-3.4.19}/openstef/feature_engineering/__init__.py +0 -0
- {openstef-3.4.17 → openstef-3.4.19}/openstef/feature_engineering/apply_features.py +0 -0
- {openstef-3.4.17 → openstef-3.4.19}/openstef/feature_engineering/feature_adder.py +0 -0
- {openstef-3.4.17 → openstef-3.4.19}/openstef/feature_engineering/feature_applicator.py +0 -0
- {openstef-3.4.17 → openstef-3.4.19}/openstef/feature_engineering/holiday_features.py +0 -0
- {openstef-3.4.17 → openstef-3.4.19}/openstef/feature_engineering/lag_features.py +0 -0
- {openstef-3.4.17 → openstef-3.4.19}/openstef/metrics/__init__.py +0 -0
- {openstef-3.4.17 → openstef-3.4.19}/openstef/metrics/figure.py +0 -0
- {openstef-3.4.17 → openstef-3.4.19}/openstef/metrics/metrics.py +0 -0
- {openstef-3.4.17 → openstef-3.4.19}/openstef/model/__init__.py +0 -0
- {openstef-3.4.17 → openstef-3.4.19}/openstef/model/basecase.py +0 -0
- {openstef-3.4.17 → openstef-3.4.19}/openstef/model/fallback.py +0 -0
- {openstef-3.4.17 → openstef-3.4.19}/openstef/model/metamodels/__init__.py +0 -0
- {openstef-3.4.17 → openstef-3.4.19}/openstef/model/metamodels/grouped_regressor.py +0 -0
- {openstef-3.4.17 → openstef-3.4.19}/openstef/model/metamodels/missing_values_handler.py +0 -0
- {openstef-3.4.17 → openstef-3.4.19}/openstef/model/objective.py +0 -0
- {openstef-3.4.17 → openstef-3.4.19}/openstef/model/objective_creator.py +0 -0
- {openstef-3.4.17 → openstef-3.4.19}/openstef/model/regressors/__init__.py +0 -0
- {openstef-3.4.17 → openstef-3.4.19}/openstef/model/regressors/arima.py +0 -0
- {openstef-3.4.17 → openstef-3.4.19}/openstef/model/regressors/custom_regressor.py +0 -0
- {openstef-3.4.17 → openstef-3.4.19}/openstef/model/regressors/dazls.py +0 -0
- {openstef-3.4.17 → openstef-3.4.19}/openstef/model/regressors/lgbm.py +0 -0
- {openstef-3.4.17 → openstef-3.4.19}/openstef/model/regressors/linear.py +0 -0
- {openstef-3.4.17 → openstef-3.4.19}/openstef/model/regressors/regressor.py +0 -0
- {openstef-3.4.17 → openstef-3.4.19}/openstef/model/regressors/xgb.py +0 -0
- {openstef-3.4.17 → openstef-3.4.19}/openstef/model/regressors/xgb_quantile.py +0 -0
- {openstef-3.4.17 → openstef-3.4.19}/openstef/model/standard_deviation_generator.py +0 -0
- {openstef-3.4.17 → openstef-3.4.19}/openstef/model_selection/__init__.py +0 -0
- {openstef-3.4.17 → openstef-3.4.19}/openstef/model_selection/model_selection.py +0 -0
- {openstef-3.4.17 → openstef-3.4.19}/openstef/monitoring/__init__.py +0 -0
- {openstef-3.4.17 → openstef-3.4.19}/openstef/monitoring/performance_meter.py +0 -0
- {openstef-3.4.17 → openstef-3.4.19}/openstef/pipeline/__init__.py +0 -0
- {openstef-3.4.17 → openstef-3.4.19}/openstef/pipeline/train_create_forecast_backtest.py +0 -0
- {openstef-3.4.17 → openstef-3.4.19}/openstef/pipeline/utils.py +0 -0
- {openstef-3.4.17 → openstef-3.4.19}/openstef/postprocessing/__init__.py +0 -0
- {openstef-3.4.17 → openstef-3.4.19}/openstef/preprocessing/__init__.py +0 -0
- {openstef-3.4.17 → openstef-3.4.19}/openstef/preprocessing/preprocessing.py +0 -0
- {openstef-3.4.17 → openstef-3.4.19}/openstef/tasks/__init__.py +0 -0
- {openstef-3.4.17 → openstef-3.4.19}/openstef/tasks/create_basecase_forecast.py +0 -0
- {openstef-3.4.17 → openstef-3.4.19}/openstef/tasks/create_forecast.py +0 -0
- {openstef-3.4.17 → openstef-3.4.19}/openstef/tasks/create_solar_forecast.py +0 -0
- {openstef-3.4.17 → openstef-3.4.19}/openstef/tasks/create_wind_forecast.py +0 -0
- {openstef-3.4.17 → openstef-3.4.19}/openstef/tasks/optimize_hyperparameters.py +0 -0
- {openstef-3.4.17 → openstef-3.4.19}/openstef/tasks/train_model.py +0 -0
- {openstef-3.4.17 → openstef-3.4.19}/openstef/tasks/utils/__init__.py +0 -0
- {openstef-3.4.17 → openstef-3.4.19}/openstef/tasks/utils/dependencies.py +0 -0
- {openstef-3.4.17 → openstef-3.4.19}/openstef/tasks/utils/predictionjobloop.py +0 -0
- {openstef-3.4.17 → openstef-3.4.19}/openstef/validation/__init__.py +0 -0
- {openstef-3.4.17 → openstef-3.4.19}/openstef.egg-info/dependency_links.txt +0 -0
- {openstef-3.4.17 → openstef-3.4.19}/openstef.egg-info/top_level.txt +0 -0
- {openstef-3.4.17 → openstef-3.4.19}/pyproject.toml +0 -0
- {openstef-3.4.17 → openstef-3.4.19}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: openstef
|
3
|
-
Version: 3.4.
|
3
|
+
Version: 3.4.19
|
4
4
|
Summary: Open short term energy forecaster
|
5
5
|
Home-page: https://github.com/OpenSTEF/openstef
|
6
6
|
Author: Alliander N.V
|
@@ -27,6 +27,7 @@ Requires-Dist: pandas~=2.2.0
|
|
27
27
|
Requires-Dist: plotly~=5.18
|
28
28
|
Requires-Dist: pvlib==0.9.4
|
29
29
|
Requires-Dist: pydantic~=2.4
|
30
|
+
Requires-Dist: pydantic-settings~=2.2.1
|
30
31
|
Requires-Dist: pymsteams~=0.2.2
|
31
32
|
Requires-Dist: scikit-learn~=1.3
|
32
33
|
Requires-Dist: scipy~=1.10
|
@@ -40,9 +41,11 @@ SPDX-FileCopyrightText: 2017-2023 Contributors to the OpenSTEF project <korte.te
|
|
40
41
|
SPDX-License-Identifier: MPL-2.0
|
41
42
|
-->
|
42
43
|
|
43
|
-
|
44
|
-
|
45
|
-
[](https://pepy.tech/project/openstef)
|
47
|
+
[](https://pepy.tech/project/openstef)
|
48
|
+
[](https://bestpractices.coreinfrastructure.org/projects/5585)
|
46
49
|
<!-- SonarCloud badges -->
|
47
50
|
[](https://sonarcloud.io/dashboard?id=OpenSTEF_openstef)
|
48
51
|
[](https://sonarcloud.io/dashboard?id=OpenSTEF_openstef)
|
@@ -53,11 +56,6 @@ SPDX-License-Identifier: MPL-2.0
|
|
53
56
|
[](https://sonarcloud.io/dashboard?id=OpenSTEF_openstef)
|
54
57
|
[](https://sonarcloud.io/dashboard?id=OpenSTEF_openstef)
|
55
58
|
[](https://sonarcloud.io/dashboard?id=OpenSTEF_openstef)
|
56
|
-
[](https://bestpractices.coreinfrastructure.org/projects/5585)
|
57
|
-
[](https://pepy.tech/project/openstef)
|
58
|
-
[](https://pepy.tech/project/openstef)
|
59
|
-
|
60
|
-
# OpenSTEF
|
61
59
|
|
62
60
|
OpenSTEF is a Python package designed for generating short-term forecasts in the energy sector. The repository includes all the essential components required for machine learning pipelines that facilitate the forecasting process. To utilize the package, users are required to furnish their own data storage and retrieval interface.
|
63
61
|
|
@@ -65,26 +63,22 @@ OpenSTEF is a Python package designed for generating short-term forecasts in the
|
|
65
63
|
- [OpenSTEF](#openstef)
|
66
64
|
- [Table of contents](#table-of-contents)
|
67
65
|
- [External information sources](#external-information-sources)
|
68
|
-
- [Installation](#
|
69
|
-
- [Install the openstef package](#install-the-openstef-package)
|
70
|
-
- [Remark regarding installation within a **conda environment on Windows**:](#remark-regarding-installation-within-a-conda-environment-on-windows)
|
66
|
+
- [Installation](#install)
|
71
67
|
- [Usage](#usage)
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
- [Contact](#contact)
|
68
|
+
- [Example notebooks](#example-notebooks)
|
69
|
+
- [Reference Implementation](#reference-implementation)
|
70
|
+
- [Database connector for OpenSTEF](#database-connector-for-openstef)
|
71
|
+
- [License](license)
|
72
|
+
- [Contributing](#contributing)
|
73
|
+
- [Contact](#contact)
|
79
74
|
|
80
75
|
# External information sources
|
81
76
|
- [Documentation website](https://openstef.github.io/openstef/index.html);
|
82
77
|
- [Python package](https://pypi.org/project/openstef/);
|
83
|
-
- [
|
78
|
+
- [Linux Foundation project page](https://www.lfenergy.org/projects/openstef/);
|
84
79
|
- [Documentation on dashboard](https://raw.githack.com/OpenSTEF/.github/main/profile/html/openstef_dashboard_doc.html);
|
85
|
-
- [Linux Foundation project page](https://openstef.github.io/openstef/index.html)
|
86
80
|
- [Video about OpenSTEF](https://www.lfenergy.org/forecasting-to-create-a-more-resilient-optimized-grid/);
|
87
|
-
- [Teams channel](https://teams.microsoft.com/l/team/19%3ac08a513650524fc988afb296cd0358cc%40thread.tacv2/conversations?groupId=bfcb763a-3a97-4938-81d7-b14512aa537d&tenantId=697f104b-d7cb-48c8-ac9f-bd87105bafdc)
|
81
|
+
- [Teams channel](https://teams.microsoft.com/l/team/19%3ac08a513650524fc988afb296cd0358cc%40thread.tacv2/conversations?groupId=bfcb763a-3a97-4938-81d7-b14512aa537d&tenantId=697f104b-d7cb-48c8-ac9f-bd87105bafdc)
|
88
82
|
|
89
83
|
# Installation
|
90
84
|
|
@@ -104,33 +98,33 @@ For more information on this issue see the [readme of pywin32](https://github.co
|
|
104
98
|
|
105
99
|
# Usage
|
106
100
|
|
107
|
-
|
108
|
-
|
109
|
-
```shell
|
110
|
-
python -m openstef task <task_name>
|
111
|
-
```
|
101
|
+
## Example notebooks
|
102
|
+
To help you get started, a set of fundamental example notebooks has been created. You can access these offline examples [here](https://github.com/OpenSTEF/openstef-offline-example).
|
112
103
|
|
113
104
|
## Reference Implementation
|
114
105
|
A complete implementation including databases, user interface, example data, etc. is available at: https://github.com/OpenSTEF/openstef-reference
|
115
106
|
|
116
107
|

|
117
108
|
Screenshot of the operational dashboard showing the key functionality of OpenSTEF.
|
118
|
-
Dashboard documentation can be found [here](https://
|
109
|
+
Dashboard documentation can be found [here](https://raw.githack.com/OpenSTEF/.github/main/profile/html/openstef_dashboard_doc.html).
|
119
110
|
|
120
|
-
|
121
|
-
This repository provides an interface to OpenSTEF (reference) databases. The repository can be found [here](https://github.com/OpenSTEF/openstef-dbc).
|
111
|
+
To run a task use:
|
122
112
|
|
123
|
-
|
124
|
-
|
113
|
+
```shell
|
114
|
+
python -m openstef task <task_name>
|
115
|
+
```
|
116
|
+
|
117
|
+
## Database connector for openstef
|
118
|
+
This repository provides an interface to OpenSTEF (reference) databases. The repository can be found [here](https://github.com/OpenSTEF/openstef-dbc).
|
125
119
|
|
126
|
-
|
120
|
+
# License
|
127
121
|
This project is licensed under the Mozilla Public License, version 2.0 - see LICENSE for details.
|
128
122
|
|
129
123
|
## Licenses third-party libraries
|
130
124
|
This project includes third-party libraries, which are licensed under their own respective Open-Source licenses. SPDX-License-Identifier headers are used to show which license is applicable. The concerning license files can be found in the LICENSES directory.
|
131
125
|
|
132
|
-
|
126
|
+
# Contributing
|
133
127
|
Please read [CODE_OF_CONDUCT.md](https://github.com/OpenSTEF/.github/blob/main/CODE_OF_CONDUCT.md), [CONTRIBUTING.md](https://github.com/OpenSTEF/.github/blob/main/CONTRIBUTING.md) and [PROJECT_GOVERNANCE.md](https://github.com/OpenSTEF/.github/blob/main/PROJECT_GOVERNANCE.md) for details on the process for submitting pull requests to us.
|
134
128
|
|
135
|
-
|
129
|
+
# Contact
|
136
130
|
Please read [SUPPORT.md](https://github.com/OpenSTEF/.github/blob/main/SUPPORT.md) for how to connect and get into contact with the OpenSTEF project
|
@@ -4,9 +4,11 @@ SPDX-FileCopyrightText: 2017-2023 Contributors to the OpenSTEF project <korte.te
|
|
4
4
|
SPDX-License-Identifier: MPL-2.0
|
5
5
|
-->
|
6
6
|
|
7
|
-
|
8
|
-
|
9
|
-
[](https://pepy.tech/project/openstef)
|
10
|
+
[](https://pepy.tech/project/openstef)
|
11
|
+
[](https://bestpractices.coreinfrastructure.org/projects/5585)
|
10
12
|
<!-- SonarCloud badges -->
|
11
13
|
[](https://sonarcloud.io/dashboard?id=OpenSTEF_openstef)
|
12
14
|
[](https://sonarcloud.io/dashboard?id=OpenSTEF_openstef)
|
@@ -17,11 +19,6 @@ SPDX-License-Identifier: MPL-2.0
|
|
17
19
|
[](https://sonarcloud.io/dashboard?id=OpenSTEF_openstef)
|
18
20
|
[](https://sonarcloud.io/dashboard?id=OpenSTEF_openstef)
|
19
21
|
[](https://sonarcloud.io/dashboard?id=OpenSTEF_openstef)
|
20
|
-
[](https://bestpractices.coreinfrastructure.org/projects/5585)
|
21
|
-
[](https://pepy.tech/project/openstef)
|
22
|
-
[](https://pepy.tech/project/openstef)
|
23
|
-
|
24
|
-
# OpenSTEF
|
25
22
|
|
26
23
|
OpenSTEF is a Python package designed for generating short-term forecasts in the energy sector. The repository includes all the essential components required for machine learning pipelines that facilitate the forecasting process. To utilize the package, users are required to furnish their own data storage and retrieval interface.
|
27
24
|
|
@@ -29,26 +26,22 @@ OpenSTEF is a Python package designed for generating short-term forecasts in the
|
|
29
26
|
- [OpenSTEF](#openstef)
|
30
27
|
- [Table of contents](#table-of-contents)
|
31
28
|
- [External information sources](#external-information-sources)
|
32
|
-
- [Installation](#
|
33
|
-
- [Install the openstef package](#install-the-openstef-package)
|
34
|
-
- [Remark regarding installation within a **conda environment on Windows**:](#remark-regarding-installation-within-a-conda-environment-on-windows)
|
29
|
+
- [Installation](#install)
|
35
30
|
- [Usage](#usage)
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
- [Contact](#contact)
|
31
|
+
- [Example notebooks](#example-notebooks)
|
32
|
+
- [Reference Implementation](#reference-implementation)
|
33
|
+
- [Database connector for OpenSTEF](#database-connector-for-openstef)
|
34
|
+
- [License](license)
|
35
|
+
- [Contributing](#contributing)
|
36
|
+
- [Contact](#contact)
|
43
37
|
|
44
38
|
# External information sources
|
45
39
|
- [Documentation website](https://openstef.github.io/openstef/index.html);
|
46
40
|
- [Python package](https://pypi.org/project/openstef/);
|
47
|
-
- [
|
41
|
+
- [Linux Foundation project page](https://www.lfenergy.org/projects/openstef/);
|
48
42
|
- [Documentation on dashboard](https://raw.githack.com/OpenSTEF/.github/main/profile/html/openstef_dashboard_doc.html);
|
49
|
-
- [Linux Foundation project page](https://openstef.github.io/openstef/index.html)
|
50
43
|
- [Video about OpenSTEF](https://www.lfenergy.org/forecasting-to-create-a-more-resilient-optimized-grid/);
|
51
|
-
- [Teams channel](https://teams.microsoft.com/l/team/19%3ac08a513650524fc988afb296cd0358cc%40thread.tacv2/conversations?groupId=bfcb763a-3a97-4938-81d7-b14512aa537d&tenantId=697f104b-d7cb-48c8-ac9f-bd87105bafdc)
|
44
|
+
- [Teams channel](https://teams.microsoft.com/l/team/19%3ac08a513650524fc988afb296cd0358cc%40thread.tacv2/conversations?groupId=bfcb763a-3a97-4938-81d7-b14512aa537d&tenantId=697f104b-d7cb-48c8-ac9f-bd87105bafdc)
|
52
45
|
|
53
46
|
# Installation
|
54
47
|
|
@@ -68,33 +61,33 @@ For more information on this issue see the [readme of pywin32](https://github.co
|
|
68
61
|
|
69
62
|
# Usage
|
70
63
|
|
71
|
-
|
72
|
-
|
73
|
-
```shell
|
74
|
-
python -m openstef task <task_name>
|
75
|
-
```
|
64
|
+
## Example notebooks
|
65
|
+
To help you get started, a set of fundamental example notebooks has been created. You can access these offline examples [here](https://github.com/OpenSTEF/openstef-offline-example).
|
76
66
|
|
77
67
|
## Reference Implementation
|
78
68
|
A complete implementation including databases, user interface, example data, etc. is available at: https://github.com/OpenSTEF/openstef-reference
|
79
69
|
|
80
70
|

|
81
71
|
Screenshot of the operational dashboard showing the key functionality of OpenSTEF.
|
82
|
-
Dashboard documentation can be found [here](https://
|
72
|
+
Dashboard documentation can be found [here](https://raw.githack.com/OpenSTEF/.github/main/profile/html/openstef_dashboard_doc.html).
|
83
73
|
|
84
|
-
|
85
|
-
This repository provides an interface to OpenSTEF (reference) databases. The repository can be found [here](https://github.com/OpenSTEF/openstef-dbc).
|
74
|
+
To run a task use:
|
86
75
|
|
87
|
-
|
88
|
-
|
76
|
+
```shell
|
77
|
+
python -m openstef task <task_name>
|
78
|
+
```
|
79
|
+
|
80
|
+
## Database connector for openstef
|
81
|
+
This repository provides an interface to OpenSTEF (reference) databases. The repository can be found [here](https://github.com/OpenSTEF/openstef-dbc).
|
89
82
|
|
90
|
-
|
83
|
+
# License
|
91
84
|
This project is licensed under the Mozilla Public License, version 2.0 - see LICENSE for details.
|
92
85
|
|
93
86
|
## Licenses third-party libraries
|
94
87
|
This project includes third-party libraries, which are licensed under their own respective Open-Source licenses. SPDX-License-Identifier headers are used to show which license is applicable. The concerning license files can be found in the LICENSES directory.
|
95
88
|
|
96
|
-
|
89
|
+
# Contributing
|
97
90
|
Please read [CODE_OF_CONDUCT.md](https://github.com/OpenSTEF/.github/blob/main/CODE_OF_CONDUCT.md), [CONTRIBUTING.md](https://github.com/OpenSTEF/.github/blob/main/CONTRIBUTING.md) and [PROJECT_GOVERNANCE.md](https://github.com/OpenSTEF/.github/blob/main/PROJECT_GOVERNANCE.md) for details on the process for submitting pull requests to us.
|
98
91
|
|
99
|
-
|
92
|
+
# Contact
|
100
93
|
Please read [SUPPORT.md](https://github.com/OpenSTEF/.github/blob/main/SUPPORT.md) for how to connect and get into contact with the OpenSTEF project
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# SPDX-FileCopyrightText: 2017-2023 Contributors to the OpenSTEF project <korte.termijn.prognoses@alliander.com> # noqa E501>
|
2
|
+
#
|
3
|
+
# SPDX-License-Identifier: MPL-2.0
|
4
|
+
|
5
|
+
from pydantic import Field
|
6
|
+
from pydantic_settings import BaseSettings, SettingsConfigDict
|
7
|
+
|
8
|
+
|
9
|
+
class AppSettings(BaseSettings):
|
10
|
+
"""Global app settings."""
|
11
|
+
|
12
|
+
model_config = SettingsConfigDict(
|
13
|
+
env_prefix="openstef_", env_file=".env", extra="ignore"
|
14
|
+
)
|
15
|
+
|
16
|
+
post_teams_messages: bool = True
|
17
|
+
|
18
|
+
# Logging settings.
|
19
|
+
log_level: str = Field("INFO", description="Log level used for logging statements.")
|
@@ -1,6 +1,7 @@
|
|
1
1
|
# SPDX-FileCopyrightText: 2017-2023 Alliander N.V. <korte.termijn.prognoses@alliander.com> # noqa E501>
|
2
2
|
#
|
3
3
|
# SPDX-License-Identifier: MPL-2.0
|
4
|
+
import logging
|
4
5
|
from abc import ABC, abstractmethod
|
5
6
|
from datetime import timedelta
|
6
7
|
from typing import Optional
|
@@ -20,6 +21,7 @@ from openstef.feature_engineering.general import (
|
|
20
21
|
)
|
21
22
|
from openstef.model.regressors.regressor import OpenstfRegressor
|
22
23
|
from openstef.pipeline.utils import generate_forecast_datetime_range
|
24
|
+
from openstef.settings import Settings
|
23
25
|
|
24
26
|
|
25
27
|
class AbstractDataPreparation(ABC):
|
@@ -120,6 +122,11 @@ class ARDataPreparation(AbstractDataPreparation):
|
|
120
122
|
def prepare_forecast_data(
|
121
123
|
self, data: pd.DataFrame
|
122
124
|
) -> tuple[pd.DataFrame, pd.DataFrame]:
|
125
|
+
structlog.configure(
|
126
|
+
wrapper_class=structlog.make_filtering_bound_logger(
|
127
|
+
logging.getLevelName(Settings.log_level)
|
128
|
+
)
|
129
|
+
)
|
123
130
|
logger = structlog.get_logger(__name__)
|
124
131
|
self.check_model()
|
125
132
|
# Prep forecast input by selecting only the forecast datetime interval (this is much smaller than the input range)
|
@@ -3,10 +3,14 @@
|
|
3
3
|
# SPDX-License-Identifier: MPL-2.0
|
4
4
|
"""This modelu contains various helper functions."""
|
5
5
|
|
6
|
+
import logging
|
7
|
+
|
6
8
|
import numpy as np
|
7
9
|
import pandas as pd
|
8
10
|
import structlog
|
9
11
|
|
12
|
+
from openstef.settings import Settings
|
13
|
+
|
10
14
|
|
11
15
|
def add_missing_feature_columns(
|
12
16
|
input_data: pd.DataFrame, features: list[str]
|
@@ -30,6 +34,11 @@ def add_missing_feature_columns(
|
|
30
34
|
Input dataframe with missing columns filled with ``np.N=nan``.
|
31
35
|
|
32
36
|
"""
|
37
|
+
structlog.configure(
|
38
|
+
wrapper_class=structlog.make_filtering_bound_logger(
|
39
|
+
logging.getLevelName(Settings.log_level)
|
40
|
+
)
|
41
|
+
)
|
33
42
|
logger = structlog.get_logger(__name__)
|
34
43
|
|
35
44
|
if features is None:
|
@@ -61,6 +70,11 @@ def remove_non_requested_feature_columns(
|
|
61
70
|
Model input data with features.
|
62
71
|
|
63
72
|
"""
|
73
|
+
structlog.configure(
|
74
|
+
wrapper_class=structlog.make_filtering_bound_logger(
|
75
|
+
logging.getLevelName(Settings.log_level)
|
76
|
+
)
|
77
|
+
)
|
64
78
|
logger = structlog.get_logger(__name__)
|
65
79
|
|
66
80
|
if requested_features is None:
|
@@ -3,6 +3,7 @@
|
|
3
3
|
# SPDX-License-Identifier: MPL-2.0
|
4
4
|
|
5
5
|
"""This module contains all wheather related functions used for feature engineering."""
|
6
|
+
import logging
|
6
7
|
from typing import Union
|
7
8
|
|
8
9
|
import numpy as np
|
@@ -12,7 +13,13 @@ import structlog
|
|
12
13
|
from pvlib.location import Location
|
13
14
|
|
14
15
|
from openstef.data_classes.prediction_job import PredictionJobDataClass
|
16
|
+
from openstef.settings import Settings
|
15
17
|
|
18
|
+
structlog.configure(
|
19
|
+
wrapper_class=structlog.make_filtering_bound_logger(
|
20
|
+
logging.getLevelName(Settings.log_level)
|
21
|
+
)
|
22
|
+
)
|
16
23
|
logger = structlog.get_logger(__name__)
|
17
24
|
|
18
25
|
|
@@ -2,6 +2,7 @@
|
|
2
2
|
#
|
3
3
|
# SPDX-License-Identifier: MPL-2.0
|
4
4
|
"""Defines reporter class."""
|
5
|
+
import logging
|
5
6
|
import os
|
6
7
|
import warnings
|
7
8
|
from dataclasses import dataclass
|
@@ -16,6 +17,7 @@ from plotly.graph_objects import Figure
|
|
16
17
|
from openstef.metrics import figure
|
17
18
|
from openstef.metrics.metrics import bias, mae, nsme, r_mae, rmse
|
18
19
|
from openstef.model.regressors.regressor import OpenstfRegressor
|
20
|
+
from openstef.settings import Settings
|
19
21
|
|
20
22
|
|
21
23
|
@dataclass
|
@@ -167,6 +169,11 @@ class Reporter:
|
|
167
169
|
def write_report_to_disk(report: Report, report_folder: str):
|
168
170
|
"""Write report to disk; e.g. for viewing report of latest models using grafana."""
|
169
171
|
# Initialize logger and serializer
|
172
|
+
structlog.configure(
|
173
|
+
wrapper_class=structlog.make_filtering_bound_logger(
|
174
|
+
logging.getLevelName(Settings.log_level)
|
175
|
+
)
|
176
|
+
)
|
170
177
|
logger = structlog.get_logger(__name__)
|
171
178
|
if report_folder:
|
172
179
|
# create path if does not exist
|
@@ -1,6 +1,7 @@
|
|
1
1
|
# SPDX-FileCopyrightText: 2017-2023 Contributors to the OpenSTEF project <korte.termijn.prognoses@alliander.com> # noqa E501>
|
2
2
|
#
|
3
3
|
# SPDX-License-Identifier: MPL-2.0
|
4
|
+
import logging
|
4
5
|
from datetime import datetime
|
5
6
|
|
6
7
|
import numpy as np
|
@@ -11,12 +12,18 @@ from sklearn.base import RegressorMixin
|
|
11
12
|
|
12
13
|
from openstef.data_classes.prediction_job import PredictionJobDataClass
|
13
14
|
from openstef.exceptions import ModelWithoutStDev
|
15
|
+
from openstef.settings import Settings
|
14
16
|
|
15
17
|
|
16
18
|
class ConfidenceIntervalApplicator:
|
17
19
|
def __init__(self, model: RegressorMixin, forecast_input_data: pd.DataFrame):
|
18
20
|
self.model = model
|
19
21
|
self.forecast_input_data = forecast_input_data
|
22
|
+
structlog.configure(
|
23
|
+
wrapper_class=structlog.make_filtering_bound_logger(
|
24
|
+
logging.getLevelName(Settings.log_level)
|
25
|
+
)
|
26
|
+
)
|
20
27
|
self.logger = structlog.get_logger(self.__class__.__name__)
|
21
28
|
|
22
29
|
def add_confidence_interval(
|
@@ -1,6 +1,7 @@
|
|
1
1
|
# SPDX-FileCopyrightText: 2017-2023 Contributors to the OpenSTEF project <korte.termijn.prognoses@alliander.com> # noqa E501>
|
2
2
|
#
|
3
3
|
# SPDX-License-Identifier: MPL-2.0
|
4
|
+
import logging
|
4
5
|
from typing import Union
|
5
6
|
|
6
7
|
import structlog
|
@@ -13,7 +14,13 @@ from openstef.model.regressors.linear import LinearOpenstfRegressor
|
|
13
14
|
from openstef.model.regressors.regressor import OpenstfRegressor
|
14
15
|
from openstef.model.regressors.xgb import XGBOpenstfRegressor
|
15
16
|
from openstef.model.regressors.xgb_quantile import XGBQuantileOpenstfRegressor
|
17
|
+
from openstef.settings import Settings
|
16
18
|
|
19
|
+
structlog.configure(
|
20
|
+
wrapper_class=structlog.make_filtering_bound_logger(
|
21
|
+
logging.getLevelName(Settings.log_level)
|
22
|
+
)
|
23
|
+
)
|
17
24
|
logger = structlog.get_logger(__name__)
|
18
25
|
|
19
26
|
valid_model_kwargs = {
|
@@ -2,6 +2,7 @@
|
|
2
2
|
#
|
3
3
|
# SPDX-License-Identifier: MPL-2.0
|
4
4
|
import json
|
5
|
+
import logging
|
5
6
|
import os
|
6
7
|
import shutil
|
7
8
|
from datetime import datetime
|
@@ -20,10 +21,16 @@ from xgboost import XGBModel # Temporary for backward compatibility
|
|
20
21
|
from openstef.data_classes.model_specifications import ModelSpecificationDataClass
|
21
22
|
from openstef.metrics.reporter import Report
|
22
23
|
from openstef.model.regressors.regressor import OpenstfRegressor
|
24
|
+
from openstef.settings import Settings
|
23
25
|
|
24
26
|
|
25
27
|
class MLflowSerializer:
|
26
28
|
def __init__(self, mlflow_tracking_uri: str):
|
29
|
+
structlog.configure(
|
30
|
+
wrapper_class=structlog.make_filtering_bound_logger(
|
31
|
+
logging.getLevelName(Settings.log_level)
|
32
|
+
)
|
33
|
+
)
|
27
34
|
self.logger = structlog.get_logger(self.__class__.__name__)
|
28
35
|
mlflow.set_tracking_uri(mlflow_tracking_uri)
|
29
36
|
self.logger.debug(f"MLflow tracking uri at init= {mlflow_tracking_uri}")
|
@@ -1,6 +1,7 @@
|
|
1
1
|
# SPDX-FileCopyrightText: 2017-2023 Contributors to the OpenSTEF project <korte.termijn.prognoses@alliander.com> # noqa E501>
|
2
2
|
#
|
3
3
|
# SPDX-License-Identifier: MPL-2.0
|
4
|
+
import logging
|
4
5
|
from typing import Union
|
5
6
|
|
6
7
|
import pandas as pd
|
@@ -8,6 +9,8 @@ import pymsteams
|
|
8
9
|
import structlog
|
9
10
|
from pymsteams import cardsection
|
10
11
|
|
12
|
+
from openstef.settings import Settings
|
13
|
+
|
11
14
|
|
12
15
|
def post_teams(
|
13
16
|
msg: Union[str, dict],
|
@@ -38,6 +41,14 @@ def post_teams(
|
|
38
41
|
Note:
|
39
42
|
This function is namespace-specific.
|
40
43
|
"""
|
44
|
+
if not Settings.post_teams_messages:
|
45
|
+
return
|
46
|
+
|
47
|
+
structlog.configure(
|
48
|
+
wrapper_class=structlog.make_filtering_bound_logger(
|
49
|
+
logging.getLevelName(Settings.log_level)
|
50
|
+
)
|
51
|
+
)
|
41
52
|
logger = structlog.get_logger(__name__)
|
42
53
|
# If no url is passed, give warning and don't send teams message
|
43
54
|
if url is None:
|
@@ -1,6 +1,7 @@
|
|
1
1
|
# SPDX-FileCopyrightText: 2017-2023 Contributors to the OpenSTEF project <korte.termijn.prognoses@alliander.com> # noqa E501>
|
2
2
|
#
|
3
3
|
# SPDX-License-Identifier: MPL-2.0
|
4
|
+
import logging
|
4
5
|
from pathlib import Path
|
5
6
|
|
6
7
|
import pandas as pd
|
@@ -18,6 +19,7 @@ from openstef.postprocessing.postprocessing import (
|
|
18
19
|
add_components_base_case_forecast,
|
19
20
|
add_prediction_job_properties_to_forecast,
|
20
21
|
)
|
22
|
+
from openstef.settings import Settings
|
21
23
|
from openstef.validation import validation
|
22
24
|
|
23
25
|
MODEL_LOCATION = Path(".")
|
@@ -42,6 +44,11 @@ def create_basecase_forecast_pipeline(
|
|
42
44
|
NoRealisedLoadError: When no realised load for given datetime range.
|
43
45
|
|
44
46
|
"""
|
47
|
+
structlog.configure(
|
48
|
+
wrapper_class=structlog.make_filtering_bound_logger(
|
49
|
+
logging.getLevelName(Settings.log_level)
|
50
|
+
)
|
51
|
+
)
|
45
52
|
logger = structlog.get_logger(__name__)
|
46
53
|
|
47
54
|
logger.info("Preprocessing data for basecase forecast")
|
@@ -2,6 +2,8 @@
|
|
2
2
|
#
|
3
3
|
# SPDX-License-Identifier: MPL-2.0
|
4
4
|
|
5
|
+
import logging
|
6
|
+
|
5
7
|
import joblib
|
6
8
|
import numpy as np
|
7
9
|
import pandas as pd
|
@@ -12,6 +14,7 @@ from openstef import PROJECT_ROOT
|
|
12
14
|
from openstef.data_classes.prediction_job import PredictionJobDataClass
|
13
15
|
from openstef.enums import ForecastType
|
14
16
|
from openstef.model.regressors.dazls import Dazls
|
17
|
+
from openstef.settings import Settings
|
15
18
|
|
16
19
|
# Set the path for the Dazls stored model
|
17
20
|
DAZLS_STORED = str(
|
@@ -95,6 +98,11 @@ def create_components_forecast_pipeline(
|
|
95
98
|
"algtype"
|
96
99
|
|
97
100
|
"""
|
101
|
+
structlog.configure(
|
102
|
+
wrapper_class=structlog.make_filtering_bound_logger(
|
103
|
+
logging.getLevelName(Settings.log_level)
|
104
|
+
)
|
105
|
+
)
|
98
106
|
logger = structlog.get_logger(__name__)
|
99
107
|
logger.info("Make components prediction", pid=pj["id"])
|
100
108
|
|
@@ -124,7 +132,6 @@ def create_components_forecast_pipeline(
|
|
124
132
|
dazls_model.target_columns = joblib.load(DAZLS_STORED + "target.z")
|
125
133
|
dazls_model.target_scaler = joblib.load(DAZLS_STORED + "target_scaler.z")
|
126
134
|
|
127
|
-
logger = structlog.get_logger(__name__)
|
128
135
|
logger.info("DAZLS model loaded", dazls_model=str(dazls_model))
|
129
136
|
|
130
137
|
# Use the predict function of Dazls model
|
@@ -1,6 +1,8 @@
|
|
1
1
|
# SPDX-FileCopyrightText: 2017-2023 Contributors to the OpenSTEF project <korte.termijn.prognoses@alliander.com> # noqa E501>
|
2
2
|
#
|
3
3
|
# SPDX-License-Identifier: MPL-2.0
|
4
|
+
import logging
|
5
|
+
|
4
6
|
import pandas as pd
|
5
7
|
import structlog
|
6
8
|
|
@@ -18,6 +20,7 @@ from openstef.postprocessing.postprocessing import (
|
|
18
20
|
add_prediction_job_properties_to_forecast,
|
19
21
|
sort_quantiles,
|
20
22
|
)
|
23
|
+
from openstef.settings import Settings
|
21
24
|
from openstef.validation import validation
|
22
25
|
|
23
26
|
|
@@ -85,6 +88,11 @@ def create_forecast_pipeline_core(
|
|
85
88
|
InputDataOngoingZeroFlatlinerError: When all recent load measurements are zero.
|
86
89
|
|
87
90
|
"""
|
91
|
+
structlog.configure(
|
92
|
+
wrapper_class=structlog.make_filtering_bound_logger(
|
93
|
+
logging.getLevelName(Settings.log_level)
|
94
|
+
)
|
95
|
+
)
|
88
96
|
logger = structlog.get_logger(__name__)
|
89
97
|
|
90
98
|
fallback_strategy = "extreme_day" # this can later be expanded
|
@@ -1,8 +1,9 @@
|
|
1
1
|
# SPDX-FileCopyrightText: 2017-2023 Contributors to the OpenSTEF project <korte.termijn.prognoses@alliander.com> # noqa E501>
|
2
2
|
#
|
3
3
|
# SPDX-License-Identifier: MPL-2.0
|
4
|
+
import logging
|
4
5
|
import os
|
5
|
-
from typing import Any
|
6
|
+
from typing import Any
|
6
7
|
|
7
8
|
import optuna
|
8
9
|
import pandas as pd
|
@@ -26,11 +27,17 @@ from openstef.pipeline.train_model import (
|
|
26
27
|
DEFAULT_TRAIN_HORIZONS_HOURS,
|
27
28
|
train_model_pipeline_core,
|
28
29
|
)
|
30
|
+
from openstef.settings import Settings
|
29
31
|
from openstef.validation import validation
|
30
32
|
|
31
33
|
optuna.logging.enable_propagation() # Propagate logs to the root logger.
|
32
34
|
optuna.logging.disable_default_handler() # Stop showing logs in sys.stderr.
|
33
35
|
|
36
|
+
structlog.configure(
|
37
|
+
wrapper_class=structlog.make_filtering_bound_logger(
|
38
|
+
logging.getLevelName(Settings.log_level)
|
39
|
+
)
|
40
|
+
)
|
34
41
|
logger = structlog.get_logger(__name__)
|
35
42
|
|
36
43
|
# See https://optuna.readthedocs.io/en/stable/reference/generated/optuna.study.Study.html#optuna.study.Study.optimize
|
@@ -23,6 +23,7 @@ from openstef.model.regressors.regressor import OpenstfRegressor
|
|
23
23
|
from openstef.model.serializer import MLflowSerializer
|
24
24
|
from openstef.model.standard_deviation_generator import StandardDeviationGenerator
|
25
25
|
from openstef.model_selection.model_selection import split_data_train_validation_test
|
26
|
+
from openstef.settings import Settings
|
26
27
|
from openstef.validation import validation
|
27
28
|
|
28
29
|
DEFAULT_TRAIN_HORIZONS_HOURS: list[float] = [0.25, 47.0]
|
@@ -31,6 +32,11 @@ MAXIMUM_MODEL_AGE: int = 7
|
|
31
32
|
DEFAULT_EARLY_STOPPING_ROUNDS: int = 10
|
32
33
|
PENALTY_FACTOR_OLD_MODEL: float = 1.2
|
33
34
|
|
35
|
+
structlog.configure(
|
36
|
+
wrapper_class=structlog.make_filtering_bound_logger(
|
37
|
+
logging.getLevelName(Settings.log_level)
|
38
|
+
)
|
39
|
+
)
|
34
40
|
logger = structlog.get_logger(__name__)
|
35
41
|
|
36
42
|
|
@@ -180,8 +186,6 @@ def train_model_pipeline_core(
|
|
180
186
|
- Datasets (tuple[pd.DataFrmae, pd.DataFrame, pd.Dataframe): The train, validation and test sets
|
181
187
|
|
182
188
|
"""
|
183
|
-
logger = structlog.get_logger(__name__)
|
184
|
-
|
185
189
|
# Call common pipeline
|
186
190
|
(
|
187
191
|
model,
|