From a9032a046e436681b677b22cf762814836c9ae09 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 12 Sep 2024 11:38:54 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- pvnet/models/base_model.py | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/pvnet/models/base_model.py b/pvnet/models/base_model.py index 4e2f05c5..4bd95395 100644 --- a/pvnet/models/base_model.py +++ b/pvnet/models/base_model.py @@ -639,24 +639,18 @@ def _log_validation_results(self, batch, y_hat, accum_batch_num): time_utc_i = time_utc[i] target_id_i = target_id[i] - results_dict = \ - { - "y": y_i, - "time_utc": time_utc_i, - } + results_dict = { + "y": y_i, + "time_utc": time_utc_i, + } if self.use_quantile_regression: results_dict.update( - { - f"y_quantile_{q}": y_hat_i[:, i] - for i, q in enumerate(self.output_quantiles) - } + {f"y_quantile_{q}": y_hat_i[:, i] for i, q in enumerate(self.output_quantiles)} ) else: results_dict["y_hat"] = y_hat_i - results_df = pd.DataFrame( - results_dict - ) + results_df = pd.DataFrame(results_dict) results_df["id"] = target_id_i results_df["batch_idx"] = accum_batch_num results_df["example_idx"] = i