Skip to content

Commit

Permalink
Fix warning from tfruns::training_run() being unable to log optimiz…
Browse files Browse the repository at this point in the history
…er learning rate.
  • Loading branch information
t-kalinowski committed Jul 3, 2024
1 parent 4cd188b commit a965e04
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@

- `keras_shape` objects (as returned by `keras3::shape()`) gain `==` and `!=` methods.

- Fixed warning from `tfruns::training_run()` being unable to log optimizer learning rate.

- Added compatibility with Keras v3.4.1 (no R user facing changes).

User facing changes with upstream Keras v3.4.0:
Expand Down
2 changes: 1 addition & 1 deletion R/zzz-metrics-callback.R
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ callback_view_metrics <- Callback(
optimizer <- model$optimizer
if (!is.null(optimizer)) {
model_info$optimizer <- py_str(optimizer)
model_info$learning_rate <- as.double(optimizer$lr)
model_info$learning_rate <- as.double(optimizer$learning_rate)
}
tfruns::write_run_metadata("properties", model_info)
}, error = function(e) {
Expand Down

0 comments on commit a965e04

Please sign in to comment.