-
Notifications
You must be signed in to change notification settings - Fork 37
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
Forecast not being generated #1245
Comments
Potential fixThank you for taking the time to write a clear issue. I believe your problem has to do with the belief time of your actuals. Could you try adding the actuals using:
and then run the forecaster again? ExplanationIn your last screenshot it became clear to me that your actuals have currently been recorded with the belief time set to the moment at which you ran the CLI command. Subsequently, the forecaster will ignore any data that shouldn't be considered to have been known at the time of creating the 5-day forecast. The |
@Flix6x if to-date - horizon < last_actual_data_date In fact the longer/larger horizon the further back in time data is used for the forecast, assuming the to-date stays the same. |
Hello @devansh287, can you help clear up something. i'm noticing that in the second picture the This might lead me to consider that maybe there was a mix-up between old values on that sensor. because if you use the command on a fresh sensor: the result would be: So can you try again with a new sensor and see if the same error persists. |
Appreciate your response, @BelhsanHmida. I did try what you suggested, but I am still not getting the desired forecast. Here is a snapshot of the sensor's csv. As you can see, the belief time is off by one day for the actuals. I am also attaching some additional messages I got from the worker log when it claimed that the forecast was generated:
Hope this is helpful. |
My goal is to make a forecast with a horizon of five days. However, that is not being generated even though the log claims that it is generated. You can reproduce the steps given below to arrive at the problem situation.
Steps taken so far
I edited the list of acceptable horizons in
supported_horizons()
function inflexmeasures/utils/time_utils.py
to include 5 days.I also modified the cli verification in the
create_forecasts
function inflexmeasures/cli/data_add.py
and added support for 5 days (which is 120 hours).I added a sensor with a daily resolution. You can put in the
asset_id
of any asset that you have createdflexmeasures add sensor --name 'grid' --unit kW --event-resolution 'P1D' --timezone 'UTC' --asset <asset_id> --attributes '{"capacity_in_mw": 0.5}
Load the following data into a csv.
Add the csv data to the sensor. Please replace
sensor_id
with the id that you get when you create the sensor.flexmeasures add beliefs --sensor <sensor_id> --source 'actuals' sensor_data_full_utc.csv --timezone 'UTC'
As you can see in the csv, we have actuals till November 14th. Lets try making a forecast for Nov 19th, which we should be able to do since our horizon has been expanded to five days.
flexmeasures add forecasts --sensor <sensor_id> --from-date '2024-11-19' --to-date '2024-11-19' --horizon 120 --as-job
This is what we get in the log:
However, as we can see in the screenshot, no forecast has actually been made.
I tried downloading the data as a csv, and it does show a belief for Nov 19th, but the value is empty.
Note: the values are all shifted by five hours and thirty minutes as I am in India, which is UTC+5:30.
Is there a misconfiguration preventing the 5-day forecast from being generated/saved properly? Are additional modifications required to support a 5-day horizon beyond supported_horizons() and CLI verification?
The text was updated successfully, but these errors were encountered: