Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Nov 27, 2023
1 parent 5c5c9f1 commit bd79763
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions pvnet/models/base_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
from huggingface_hub.file_download import hf_hub_download
from huggingface_hub.hf_api import HfApi
from huggingface_hub.utils._deprecation import _deprecate_positional_args

from ocf_datapipes.utils.consts import BatchKey
from ocf_ml_metrics.evaluation.evaluation import evaluation
from ocf_ml_metrics.metrics.errors import common_metrics
Expand Down Expand Up @@ -371,8 +370,8 @@ def _calculate_val_losses(self, y, y_hat):
# Take median value for remaining metric calculations
y_hat = self._quantiles_to_prediction(y_hat)

common_metrics_each_step = common_metrics(predictions=y_hat, targets=y)
mse_each_step = common_metrics_each_step["rmse"]**2
common_metrics_each_step = common_metrics(predictions=y_hat, targets=y)
mse_each_step = common_metrics_each_step["rmse"] ** 2
mae_each_step = common_metrics_each_step["mae"]

Check warning on line 375 in pvnet/models/base_model.py

View check run for this annotation

Codecov / codecov/patch

pvnet/models/base_model.py#L373-L375

Added lines #L373 - L375 were not covered by tests

losses.update({f"MSE_horizon/step_{i:02}": m for i, m in enumerate(mse_each_step)})
Expand Down

0 comments on commit bd79763

Please sign in to comment.