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 Dec 5, 2023
1 parent 0a9a492 commit 56dbdba
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pvnet/models/base_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@ def _training_accumulate_log(self, batch, batch_idx, losses, y_hat):
def training_step(self, batch, batch_idx):
"""Run training step"""
y_hat = self(batch)
y = batch[self._target_key][:,0, -self.forecast_len_30 :]
y = batch[self._target_key][:, 0, -self.forecast_len_30 :]

losses = self._calculate_common_losses(y, y_hat)
losses = {f"{k}/train": v for k, v in losses.items()}
Expand All @@ -454,7 +454,7 @@ def validation_step(self, batch: dict, batch_idx):
print(f"{batch[self._target_key][:, -self.forecast_len_30 :, 0].shape=}")
print(f"{self.forecast_len_30=}")
# Sensor seems to be in batch, station, time order
y = batch[self._target_key][:,0, -self.forecast_len_30 :]
y = batch[self._target_key][:, 0, -self.forecast_len_30 :]

losses = self._calculate_common_losses(y, y_hat)
losses.update(self._calculate_val_losses(y, y_hat))
Expand Down

0 comments on commit 56dbdba

Please sign in to comment.