Skip to content

Commit a965e04

Browse files
committed
Fix warning from tfruns::training_run() being unable to log optimizer learning rate.
1 parent 4cd188b commit a965e04

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

NEWS.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55

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

8+
- Fixed warning from `tfruns::training_run()` being unable to log optimizer learning rate.
9+
810
- Added compatibility with Keras v3.4.1 (no R user facing changes).
911

1012
User facing changes with upstream Keras v3.4.0:

R/zzz-metrics-callback.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ callback_view_metrics <- Callback(
119119
optimizer <- model$optimizer
120120
if (!is.null(optimizer)) {
121121
model_info$optimizer <- py_str(optimizer)
122-
model_info$learning_rate <- as.double(optimizer$lr)
122+
model_info$learning_rate <- as.double(optimizer$learning_rate)
123123
}
124124
tfruns::write_run_metadata("properties", model_info)
125125
}, error = function(e) {

0 commit comments

Comments
 (0)