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 Sep 12, 2024
1 parent 6f8b946 commit a9032a0
Showing 1 changed file with 6 additions and 12 deletions.
18 changes: 6 additions & 12 deletions pvnet/models/base_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a9032a0

Please sign in to comment.