-
-
Notifications
You must be signed in to change notification settings - Fork 4
Improve error readability for missing NWP data in PVNet model #69
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
base: main
Are you sure you want to change the base?
Improve error readability for missing NWP data in PVNet model #69
Conversation
normed_preds = [] | ||
with torch.no_grad(): | ||
|
||
# note this only running ones site |
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.
could you add these comment back in please
log.exception("Failed to prepare data sources or load model.") | ||
log.exception(f"Error: {e}") | ||
|
||
def _get_config(self): |
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.
could you move these back to the same position there were. Otherwise its very hard to tell what has changed?
Hi, |
dest_nwp_path=nwp_mo_global_path, | ||
source="mo_global", | ||
), | ||
try: |
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.
Soryr this wont do it. You need to actually look at the configuration and see if that data is available in the NWP data / timestamps
@peterdudfield I hv changed tho If possible, could you please explain in a bit more detail what else needs to be changed or checked? |
So as we load the NWP in, we can look at the time variable and see how far in the future the data goes. Then in configruation, we need to make sure there is enough data. Look in config --> NWP --> interval_end_minutes |
Note #67 is not marked at good-first-isse or contributors-welcome, so it maybe be easier for an internal OCF person to do it |
Sorry about that—my mistake. Thank you for your time and guidance! |
Fixes #67
This PR improves error readability for the PVNet model when Numerical Weather Prediction (NWP) data is missing or invalid.
Instead of showing confusing traceback errors like:
ValueError: Did not find any periods ...
This PR adds user-friendly error messages:
Could not run the forecast because there wasn’t enough NWP data. Please check your NWP input files and time range.
How tested
Notes