Skip to content

Commit

Permalink
Merge commit 'a9032a046e436681b677b22cf762814836c9ae09' into issue.csv
Browse files Browse the repository at this point in the history
  • Loading branch information
peterdudfield committed Sep 12, 2024
2 parents 74f4f6d + a9032a0 commit 91a7e94
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 91a7e94

Please sign in to comment.