Skip to content

Commit

Permalink
chore: disable Lint/FormatParameterMismatch cop
Browse files Browse the repository at this point in the history
  • Loading branch information
yoshoku committed Jan 1, 2024
1 parent fef7b64 commit 120ff21
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/rumale/torch/neural_net_regressor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -179,12 +179,14 @@ def train(data_loader)
end

def display_epoch(train_loader, test_loader, epoch)
# rubocop:disable Lint/FormatParameterMismatch
if test_loader.nil?
puts(format("epoch: %#{max_epoch.to_s.length}d/#{max_epoch} - loss: %.4f", epoch, evaluate(train_loader)))
else
puts(format("epoch: %#{max_epoch.to_s.length}d/#{max_epoch} - loss: %.4f - val_loss: %.4f",
epoch, evaluate(train_loader), evaluate(test_loader)))
end
# rubocop:enable Lint/FormatParameterMismatch
end

def evaluate(data_loader)
Expand Down

0 comments on commit 120ff21

Please sign in to comment.