openstef 3.2.60__py3-none-any.whl → 3.2.62__py3-none-any.whl

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.
@@ -1,3 +1,3 @@
1
1
  SPDX-FileCopyrightText: 2017-2022 Contributors to the OpenSTEF project <korte.termijn.prognoses@alliander.com>
2
2
 
3
- SPDX-License-Identifier: MPL-2.0
3
+ SPDX-License-Identifier: MPL-2.0
@@ -1,3 +1,3 @@
1
1
  SPDX-FileCopyrightText: 2017-2022 Contributors to the OpenSTEF project <korte.termijn.prognoses@alliander.com>
2
2
 
3
- SPDX-License-Identifier: MPL-2.0
3
+ SPDX-License-Identifier: MPL-2.0
@@ -19,27 +19,27 @@ class PredictionJobDataClass(BaseModel):
19
19
  """The predictions job id (often abreviated as pid)."""
20
20
  model: str
21
21
  """The model type that should be used.
22
-
22
+
23
23
  Options are:
24
24
  - ``"xgb"``
25
25
  - ``"xgb_quantile"``
26
26
  - ``"lgb"``
27
27
  - ``"linear"``
28
28
  - ``"proloaf"`` (extra dependencies requiered, see README)
29
-
29
+
30
30
  If unsure what to pick, choose ``"xgb"``.
31
-
31
+
32
32
  """
33
33
  forecast_type: str
34
34
  """The type of forecasts that should be made.
35
-
35
+
36
36
  Options are:
37
37
  - ``"demand"``
38
38
  - ``"wind"``
39
- - ``"basecase"``
40
-
39
+ - ``"basecase"``
40
+
41
41
  If unsure what to pick, choose ``"demand"``.
42
-
42
+
43
43
  """
44
44
  horizon_minutes: int
45
45
  """The horizon of the desired forecast in minutes."""
@@ -206,12 +206,12 @@ def optimize_hyperparameters_pipeline_core(
206
206
  hyper_params=best_hyperparams,
207
207
  )
208
208
 
209
- # If the model type is quantile, train a model with the best parameters for all quantiles
210
- # (optimization is only done for quantile 0.5)
211
- if objective.model.can_predict_quantiles:
212
- best_model, report, modelspecs, _ = train_model_pipeline_core(
213
- pj=pj, input_data=input_data, model_specs=model_specs
214
- )
209
+ # Train a model using the regular train pipeline.
210
+ # The train/validation/test split used in hyperparam optimisation
211
+ # is less suitable for an operational model.
212
+ best_model, report, modelspecs, _ = train_model_pipeline_core(
213
+ pj=pj, input_data=input_data, model_specs=model_specs
214
+ )
215
215
 
216
216
  # Save model and report. Report is always saved to MLFlow and optionally to disk
217
217
  report = objective.create_report(model=best_model)
@@ -21,10 +21,9 @@ Example:
21
21
  $ python create_components_forecast.py
22
22
 
23
23
  """
24
- from datetime import datetime, timedelta
24
+ from datetime import datetime, timedelta, timezone
25
25
  from pathlib import Path
26
26
 
27
- import pytz
28
27
  import structlog
29
28
  import pandas as pd
30
29
 
@@ -105,9 +104,9 @@ def create_components_forecast_task(
105
104
  logger.debug("Written forecast to database")
106
105
 
107
106
  # Check if forecast was complete enough, otherwise raise exception
108
- if forecasts.index.max() < datetime.utcnow().replace(tzinfo=pytz.utc) + timedelta(
109
- hours=30
110
- ):
107
+ if forecasts.index.max() < datetime.utcnow().replace(
108
+ tzinfo=timezone.utc
109
+ ) + timedelta(hours=30):
111
110
 
112
111
  # Check which input data is missing the most.
113
112
  # Do this by counting the NANs for (load)forecast, radiation and windspeed
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: openstef
3
- Version: 3.2.60
3
+ Version: 3.2.62
4
4
  Summary: Open short term energy forecaster
5
5
  Home-page: https://github.com/OpenSTEF/openstef
6
6
  Author: Alliander N.V
@@ -15,25 +15,22 @@ Classifier: Programming Language :: Python :: 3.10
15
15
  Requires-Python: >=3.9.0
16
16
  Description-Content-Type: text/markdown
17
17
  License-File: LICENSE
18
- Requires-Dist: cufflinks (~=0.17.3)
19
18
  Requires-Dist: holidays (==0.21)
20
- Requires-Dist: lightgbm (~=3.3.3)
21
- Requires-Dist: matplotlib (~=3.6.2)
22
- Requires-Dist: mlflow (~=2.1.1)
23
- Requires-Dist: networkx (~=2.8.8)
24
- Requires-Dist: numpy (<2)
25
- Requires-Dist: optuna (~=3.0.5)
26
- Requires-Dist: pandas (~=1.5.2)
27
- Requires-Dist: plotly (~=5.11.0)
19
+ Requires-Dist: lightgbm (~=3.3)
20
+ Requires-Dist: matplotlib (~=3.7)
21
+ Requires-Dist: mlflow (~=2.3)
22
+ Requires-Dist: networkx (~=3.1)
23
+ Requires-Dist: optuna (~=3.1)
24
+ Requires-Dist: pandas (~=2.0)
25
+ Requires-Dist: plotly (~=5.14)
28
26
  Requires-Dist: pvlib (==0.9.4)
29
- Requires-Dist: pydantic (~=1.10.4)
27
+ Requires-Dist: pydantic (~=1.10)
30
28
  Requires-Dist: pymsteams (~=0.2.2)
31
- Requires-Dist: pytz (~=2022.7)
32
- Requires-Dist: scikit-learn (~=1.2.0)
33
- Requires-Dist: scipy (~=1.8.1)
34
- Requires-Dist: statsmodels (~=0.13.1)
35
- Requires-Dist: structlog (~=23.1.0)
36
- Requires-Dist: xgboost (~=1.7.3)
29
+ Requires-Dist: scikit-learn (~=1.2)
30
+ Requires-Dist: scipy (~=1.10)
31
+ Requires-Dist: statsmodels (~=0.13)
32
+ Requires-Dist: structlog (~=23.1)
33
+ Requires-Dist: xgboost (~=1.7)
37
34
  Provides-Extra: proloaf
38
35
  Requires-Dist: proloaf (==0.2.0) ; extra == 'proloaf'
39
36
  Requires-Dist: torch (==1.10.0) ; extra == 'proloaf'
@@ -62,13 +59,13 @@ SPDX-License-Identifier: MPL-2.0
62
59
 
63
60
  # OpenSTEF
64
61
 
65
- OpenSTEF is a Python package which is used to make short term forecasts for the energy sector. This repository contains all components for the machine learning pipeline required to make a forecast. In order to use the package you need to provide your own data storage and retrieval interface.
62
+ OpenSTEF is a Python package which is used to make short term forecasts for the energy sector. This repository contains all components for the machine learning pipeline required to make a forecast. In order to use the package you need to provide your own data storage and retrieval interface.
66
63
 
67
64
  Find the latest information on the project on [the project's website](https://www.lfenergy.org/projects/openstef/).
68
65
 
69
- The `openstef` Python package is available at: https://pypi.org/project/openstef/.
66
+ The `openstef` Python package is available at: https://pypi.org/project/openstef/.
70
67
 
71
- Documentation is available at: https://openstef.github.io/openstef/index.html.
68
+ Documentation is available at: https://openstef.github.io/openstef/index.html.
72
69
 
73
70
  You can also watch a [video about OpenSTEF](https://www.lfenergy.org/forecasting-to-create-a-more-resilient-optimized-grid/) instead of reading about the project.
74
71
 
@@ -106,7 +103,7 @@ python -m openstef task <task_name>
106
103
  A complete implementation including databases, user interface, example data, etc. is available at: https://github.com/OpenSTEF/openstef-reference
107
104
 
108
105
  ![screenshot](https://user-images.githubusercontent.com/60883372/146760483-29af3ac7-62af-4f13-98c7-982a79c517d1.jpg)
109
- Screenshot of the operational dashboard showing the key functionality of OpenSTEF.
106
+ Screenshot of the operational dashboard showing the key functionality of OpenSTEF.
110
107
  Dashboard documentation can be found [here](https://github.com/OpenSTEF/.github/blob/main/profile/README.md).
111
108
 
112
109
  ## License
@@ -5,13 +5,13 @@ openstef/exceptions.py,sha256=LB4rEWzMXNU0OaKTGXG45UwD48JgA8TU8axF6T06b6w,1874
5
5
  openstef/data/dazls_stored.sav,sha256=_zI2F8Dpf2sFiTrfarTB2zVM6wSjwnXOJKmNvcN4Mmc,41527962
6
6
  openstef/data/dazls_stored.sav.license,sha256=d4-iNVrjbvR_ZNyAf-p0LLEGiFWZDyY9Uq075ufksaY,145
7
7
  openstef/data/dutch_holidays_2020-2022.csv,sha256=pS-CjE0igYXd-2dG-MlqyvR2fgYgXkbNmgCKyTjmwxs,23704
8
- openstef/data/dutch_holidays_2020-2022.csv.license,sha256=W-nEhA80TxlQwh6nLUfB4WkTDU3tSm8QnPxrl8fDLGA,144
8
+ openstef/data/dutch_holidays_2020-2022.csv.license,sha256=d4-iNVrjbvR_ZNyAf-p0LLEGiFWZDyY9Uq075ufksaY,145
9
9
  openstef/data/pv_single_coefs.csv,sha256=jadIEYdHvl1lnV_06X_FASkJZ6C3Hecs5xZnH1gPMvI,24779
10
- openstef/data/pv_single_coefs.csv.license,sha256=W-nEhA80TxlQwh6nLUfB4WkTDU3tSm8QnPxrl8fDLGA,144
10
+ openstef/data/pv_single_coefs.csv.license,sha256=d4-iNVrjbvR_ZNyAf-p0LLEGiFWZDyY9Uq075ufksaY,145
11
11
  openstef/data_classes/__init__.py,sha256=e7h0IiPqbDYHNbQ3DglnbLqGEKOB4Y8YcHa16oQPNj4,163
12
12
  openstef/data_classes/data_prep.py,sha256=TE7wbZ2SXKCeJCIPQoRfRNCZvJFXtI0UPLW2oC3peFY,3414
13
13
  openstef/data_classes/model_specifications.py,sha256=k5z6TNuI2WSYYv6DsxSVQxlGB3UqFxiYxGc9IZs9z1Y,1194
14
- openstef/data_classes/prediction_job.py,sha256=LwvNeimTZBXGEYzQJSdIflTB1bQwsyIhblw4k0Syox8,4828
14
+ openstef/data_classes/prediction_job.py,sha256=lxRmlPlWq29xsQyuAOYU9WIZaRC9Kn2r9tTi9atJNRs,4797
15
15
  openstef/data_classes/split_function.py,sha256=RHvtMh14vxbO00mDWzCunFQh3aXzLgIGvk8xuuvZiEQ,3355
16
16
  openstef/feature_engineering/__init__.py,sha256=e7h0IiPqbDYHNbQ3DglnbLqGEKOB4Y8YcHa16oQPNj4,163
17
17
  openstef/feature_engineering/apply_features.py,sha256=zjhYTgXl9XwjKdiU8K1gB5AIufHjNft18bgb89b_ujM,4114
@@ -58,7 +58,7 @@ openstef/pipeline/__init__.py,sha256=e7h0IiPqbDYHNbQ3DglnbLqGEKOB4Y8YcHa16oQPNj4
58
58
  openstef/pipeline/create_basecase_forecast.py,sha256=JwRkEf9cuWYSXO9G06TBLdpL6eZIvg7SgPM1Ek8suQ4,4284
59
59
  openstef/pipeline/create_component_forecast.py,sha256=PAPVQ4zKaVKvb9NuqCVFSy6ePegxiETDDghR1-atv1s,5009
60
60
  openstef/pipeline/create_forecast.py,sha256=ZqbHXC4Xnybt0amIabSiK98Da0e3-vjqnL3zxrkKpmo,5008
61
- openstef/pipeline/optimize_hyperparameters.py,sha256=vFz9HnzOmNC6iscK03lmaRRIMdMfRKqu1EwdU1moD6w,10854
61
+ openstef/pipeline/optimize_hyperparameters.py,sha256=SdYaHOo5kFJQloCY_X0ohryH3tUVsyyiOeGtYDgnno8,10824
62
62
  openstef/pipeline/train_create_forecast_backtest.py,sha256=eOzFUsk09DbbRnJ5xwtGz38KDrL6ovzb-EeP1HoDJQU,5444
63
63
  openstef/pipeline/train_model.py,sha256=Wy9rWAoB8QF0wphx_d-gTKa0akUkU9wdqBlr4t9PmWo,17861
64
64
  openstef/pipeline/utils.py,sha256=TAkJpK1scY7WUSMz9GvsvJUSu-FkrySTF_qbKQv82jA,2086
@@ -69,7 +69,7 @@ openstef/preprocessing/preprocessing.py,sha256=ZrQkEt2XrPTpO-KAK6N2cFiD9U1DXI_Ga
69
69
  openstef/tasks/__init__.py,sha256=e7h0IiPqbDYHNbQ3DglnbLqGEKOB4Y8YcHa16oQPNj4,163
70
70
  openstef/tasks/calculate_kpi.py,sha256=L57gq_1SyXR-7DXrpAQbdXqqUINlyTQ9nrsA42mCIo0,11985
71
71
  openstef/tasks/create_basecase_forecast.py,sha256=_xtogX3aFoxxFJM2nCpFKv9YuvGLRTBl7U6t_d4ZmAQ,3329
72
- openstef/tasks/create_components_forecast.py,sha256=wgVnJdsHFOTCjzyPs7QagLCmMoeLfwNZy8IcADfkaug,5520
72
+ openstef/tasks/create_components_forecast.py,sha256=mvNxjBS7laqJVYgcKQv87QaOD1VeahApy9x6hLW9Ot0,5522
73
73
  openstef/tasks/create_forecast.py,sha256=V6rkcH_ThKe6bDcMjDg_OtPaKrw13ArykG8kSZiJm6k,3467
74
74
  openstef/tasks/create_solar_forecast.py,sha256=GwV0OZCD01lDcbMxl62EjIHmCeoK_u-JgzTTNVTaQAY,15049
75
75
  openstef/tasks/create_wind_forecast.py,sha256=HElcnYxmkwoRyrmrJ1k8Y-dUl7ejLpSsyosvwgxRnUY,2907
@@ -83,8 +83,8 @@ openstef/tasks/utils/predictionjobloop.py,sha256=_gPzcGKVkITtelDT29PDsQC-eCeDece
83
83
  openstef/tasks/utils/taskcontext.py,sha256=ZKHj-SPrBXAbGpx1UDYUBHpgWT1aypb9ueIq-reSp7o,5401
84
84
  openstef/validation/__init__.py,sha256=e7h0IiPqbDYHNbQ3DglnbLqGEKOB4Y8YcHa16oQPNj4,163
85
85
  openstef/validation/validation.py,sha256=Chzbfgxk_ckUnKrASlbP0_wfzh73UgY5saMAyhSBK0U,16917
86
- openstef-3.2.60.dist-info/LICENSE,sha256=7Pm2fWFFHHUG5lDHed1vl5CjzxObIXQglnYsEdtjo_k,14907
87
- openstef-3.2.60.dist-info/METADATA,sha256=kihKpzruqB4H5Ravta6gjJxcaEZ_k6PYPHOUowWtF4c,7092
88
- openstef-3.2.60.dist-info/WHEEL,sha256=pkctZYzUS4AYVn6dJ-7367OJZivF2e8RA9b_ZBjif18,92
89
- openstef-3.2.60.dist-info/top_level.txt,sha256=kD0H4PqrQoncZ957FvqwfBxa89kTrun4Z_RAPs_HhLs,9
90
- openstef-3.2.60.dist-info/RECORD,,
86
+ openstef-3.2.62.dist-info/LICENSE,sha256=7Pm2fWFFHHUG5lDHed1vl5CjzxObIXQglnYsEdtjo_k,14907
87
+ openstef-3.2.62.dist-info/METADATA,sha256=JiEIJqGjFX7GkFynxAsWw4wG_zgHuJ8NZ6OBNgTlAco,6970
88
+ openstef-3.2.62.dist-info/WHEEL,sha256=pkctZYzUS4AYVn6dJ-7367OJZivF2e8RA9b_ZBjif18,92
89
+ openstef-3.2.62.dist-info/top_level.txt,sha256=kD0H4PqrQoncZ957FvqwfBxa89kTrun4Z_RAPs_HhLs,9
90
+ openstef-3.2.62.dist-info/RECORD,,