Skip to content

Feat/optional training start#1917

Open
Flix6x wants to merge 71 commits intomainfrom
feat/optional-training-start
Open

Feat/optional training start#1917
Flix6x wants to merge 71 commits intomainfrom
feat/optional-training-start

Conversation

@Flix6x
Copy link
Contributor

@Flix6x Flix6x commented Jan 14, 2026

Description

  • Stop relying on start-date to be set by the user
  • Stop relying on end-date to be set by the user
  • Start testing the ForecasterParametersSchema directly to validate derivation of timing parameters
  • Added changelog item in documentation/changelog.rst

Look & Feel

possible to run forecasting cli command without start_date or end_date:

Examples:

  • flexmeasures add forecasts --sensor 20 --start-date "2025-01-01T00:00:00+01"
  • flexmeasures add forecasts --sensor 20 --end-date "2025-01-15T00:00:00+01"
  • flexmeasures add forecasts --sensor 20

How to test

pytest flexmeasures/data/schemas/tests/test_forecasting.py

...

Further Improvements

  • Clarify train-period vs max-training-window in cli.data_add.train_predict_pipeline (and for our first example in forecasting.rst we should mention train-period rather than max-training-window).
  • Rename def train_predict_pipeline -> def add_forecast

Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
@Flix6x Flix6x added this to the 0.31.0 milestone Jan 14, 2026
@read-the-docs-community
Copy link

read-the-docs-community bot commented Jan 14, 2026

Documentation build overview

📚 flexmeasures | 🛠️ Build #31315929 | 📁 Comparing f53173b against latest (0904e02)


🔍 Preview build

Show files changed (4 files in total): 📝 4 modified | ➕ 0 added | ➖ 0 deleted
File Status
changelog.html 📝 modified
_autosummary/flexmeasures.api.v3_0.sensors.html 📝 modified
api/v3_0.html 📝 modified
features/forecasting.html 📝 modified

@Flix6x Flix6x requested a review from BelhsanHmida January 15, 2026 08:49
Flix6x and others added 24 commits January 15, 2026 11:49
Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
…t_timing_parameters_of_forecaster_parameters_schema"`)

Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: Mohamed Belhsan Hmida <mohamedbelhsanhmida@gmail.com>
Signed-off-by: Mohamed Belhsan Hmida <mohamedbelhsanhmida@gmail.com>
…ameter in expected_timing_output

Signed-off-by: Mohamed Belhsan Hmida <mohamedbelhsanhmida@gmail.com>
Signed-off-by: Mohamed Belhsan Hmida <mohamedbelhsanhmida@gmail.com>
Signed-off-by: Mohamed Belhsan Hmida <mohamedbelhsanhmida@gmail.com>
Signed-off-by: Mohamed Belhsan Hmida <mohamedbelhsanhmida@gmail.com>
Signed-off-by: Mohamed Belhsan Hmida <mohamedbelhsanhmida@gmail.com>
Signed-off-by: Mohamed Belhsan Hmida <mohamedbelhsanhmida@gmail.com>
Signed-off-by: Mohamed Belhsan Hmida <mohamedbelhsanhmida@gmail.com>
…hema

Signed-off-by: Mohamed Belhsan Hmida <mohamedbelhsanhmida@gmail.com>
Signed-off-by: Mohamed Belhsan Hmida <mohamedbelhsanhmida@gmail.com>
…ParametersSchema

Signed-off-by: Mohamed Belhsan Hmida <mohamedbelhsanhmida@gmail.com>
…riod)

Signed-off-by: Mohamed Belhsan Hmida <mohamedbelhsanhmida@gmail.com>
…ncy (predict_period)

Signed-off-by: Mohamed Belhsan Hmida <mohamedbelhsanhmida@gmail.com>
…metersSchema validation

Signed-off-by: Mohamed Belhsan Hmida <mohamedbelhsanhmida@gmail.com>
Signed-off-by: Mohamed Belhsan Hmida <mohamedbelhsanhmida@gmail.com>
…f FutureWarning: 'H' is deprecated

Signed-off-by: Mohamed Belhsan Hmida <mohamedbelhsanhmida@gmail.com>
BelhsanHmida and others added 13 commits February 6, 2026 16:13
…-forecast-horizon or end_date is given

Signed-off-by: Mohamed Belhsan Hmida <mohamedbelhsanhmida@gmail.com>
…ours in ForecasterParametersSchema

Signed-off-by: Mohamed Belhsan Hmida <mohamedbelhsanhmida@gmail.com>
Signed-off-by: Mohamed Belhsan Hmida <mohamedbelhsanhmida@gmail.com>
…t_case

Signed-off-by: Mohamed Belhsan Hmida <mohamedbelhsanhmida@gmail.com>
…t cases that they are set to predict_period duration

Signed-off-by: Mohamed Belhsan Hmida <mohamedbelhsanhmida@gmail.com>
Signed-off-by: Mohamed Belhsan Hmida <mohamedbelhsanhmida@gmail.com>
…y on retrain_frequency

Signed-off-by: Mohamed Belhsan Hmida <mohamedbelhsanhmida@gmail.com>
Signed-off-by: Mohamed Belhsan Hmida <mohamedbelhsanhmida@gmail.com>
Signed-off-by: Mohamed Belhsan Hmida <mohamedbelhsanhmida@gmail.com>
Signed-off-by: Mohamed Belhsan Hmida <mohamedbelhsanhmida@gmail.com>
Signed-off-by: Mohamed Belhsan Hmida <mohamedbelhsanhmida@gmail.com>
Signed-off-by: Mohamed Belhsan Hmida <mohamedbelhsanhmida@gmail.com>
Flix6x and others added 10 commits February 7, 2026 20:22
…train period for each testcase and number of cycles

Signed-off-by: Mohamed Belhsan Hmida <mohamedbelhsanhmida@gmail.com>
Co-authored-by: Felix Claessen <30658763+Flix6x@users.noreply.github.com>
Signed-off-by: Mohamed Belhsan Hmida <149331360+BelhsanHmida@users.noreply.github.com>
Signed-off-by: Mohamed Belhsan Hmida <mohamedbelhsanhmida@gmail.com>
Signed-off-by: Mohamed Belhsan Hmida <mohamedbelhsanhmida@gmail.com>
Signed-off-by: Mohamed Belhsan Hmida <mohamedbelhsanhmida@gmail.com>
Signed-off-by: Mohamed Belhsan Hmida <mohamedbelhsanhmida@gmail.com>
@BelhsanHmida
Copy link
Contributor

BelhsanHmida commented Feb 13, 2026

The Duration object has a method for shifting with respect to another datetime. But you should try it out for cases like 31 January plus P1M, and 31 March minus P1M. For our use case in these timing parameters we'd probably prefer picking the next or preceding date, respectively, over raising an error.

i created this issue for this: #1970

Flix6x and others added 3 commits February 13, 2026 12:52
Signed-off-by: F.N. Claessen <claessen@seita.nl>
…ration

Signed-off-by: Mohamed Belhsan Hmida <mohamedbelhsanhmida@gmail.com>
Signed-off-by: Mohamed Belhsan Hmida <mohamedbelhsanhmida@gmail.com>
Signed-off-by: Mohamed Belhsan Hmida <mohamedbelhsanhmida@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make forecast training start optional

3 participants