-
-
Notifications
You must be signed in to change notification settings - Fork 4
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
Fixed error caused by incorrect call to common_metrics in validation step #105
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #105 +/- ##
=======================================
Coverage 50.85% 50.85%
=======================================
Files 26 26
Lines 1701 1701
=======================================
Hits 865 865
Misses 836 836 ☔ View full report in Codecov by Sentry. |
@dfulu this looks good to go? |
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.
If I'm correct I think that common_metrics returns scalar values for the rmse and mae. mse_each_step
is expected to be an array of mse values for each forecast step. Same with mae_each_step
. So I think there is still some work to do to fix this
but this is about the inputs? |
Yep - the PR in ocf-ml-metrics (here: openclimatefix/ocf-ml-metrics#13) updates the common_metrics function to handle scalar and array return types + includes tests for both cases |
Thanks @confusedmatrix, I merged your changes to ocf-ml-metrics, so once the build and pip release is done we should update the requirements here and that should be it. Also @peterdudfield we probably should have a full end2end test for the PVNet training, loop, but I'd say lets do that in a separate issue |
I agree, year put that in a different issue |
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.
ocf-ml-metrics 0.0.11 has been release so I think this is good to go now
Pull Request
Description
This PR fixes a typo in a parameter name when calling
common_metrics
in the validation step during training of PVNet. Additionally, ascommon_metrics
expects np.ndarrays as input, the input predictions and target values are cast from torch Tensors to np.ndarrays.This PR works in conjunction with openclimatefix/ocf-ml-metrics#13 to provide correct logging of validation metrics during training using multiple forecast horizons.
How Has This Been Tested?
Tested by training locally over pre-made data batches
If your changes affect data processing, have you plotted any changes? i.e. have you done a quick sanity check?
Checklist: