Skip to content

Commit

Permalink
remove on_step
Browse files Browse the repository at this point in the history
  • Loading branch information
namsaraeva committed May 24, 2024
1 parent 4a4c03d commit f2139e1
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/sparcscore/ml/plmodels.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,8 @@ def training_step(self, batch):
# accuracy metrics for regression???

self.log('loss/train', loss, on_step=False, on_epoch=True, prog_bar=True)
self.log('mse/train', self.mse(output, target), on_step=False, on_epoch=True, prog_bar=True)
self.log('mae/train', self.mae(output, target), on_step=False, on_epoch=True, prog_bar=True)
self.log('mse/train', self.mse(output, target), on_epoch=True, prog_bar=True)
self.log('mae/train', self.mae(output, target), on_epoch=True, prog_bar=True)

return {'loss': loss, 'predictions': output, 'targets': target}

Expand All @@ -225,8 +225,8 @@ def validation_step(self, batch):
# accuracy metrics for regression???

self.log('loss/val', loss, on_step=False, on_epoch=True, prog_bar=True)
self.log('mse/val', self.mse(output, target), on_step=False, on_epoch=True, prog_bar=True)
self.log('mae/val', self.mae(output, target), on_step=False, on_epoch=True, prog_bar=True)
self.log('mse/val', self.mse(output, target), on_epoch=True, prog_bar=True)
self.log('mae/val', self.mae(output, target), on_epoch=True, prog_bar=True)

return {'loss': loss, 'predictions': output, 'targets': target}

Expand All @@ -239,8 +239,8 @@ def test_step(self, batch):
# accuracy metrics for regression???

self.log('loss/test', loss, on_step=False, on_epoch=True, prog_bar=True)
self.log('mse/test', self.mse(output, target), on_step=False, on_epoch=True, prog_bar=True)
self.log('mae/test', self.mae(output, target), on_step=False, on_epoch=True, prog_bar=True)
self.log('mse/test', self.mse(output, target), on_epoch=True, prog_bar=True)
self.log('mae/test', self.mae(output, target), on_epoch=True, prog_bar=True)

return {'loss': loss, 'predictions': output, 'targets': target}

Expand Down

0 comments on commit f2139e1

Please sign in to comment.