Skip to content

Commit 80cc227

Browse files
committed
move hint into error message
1 parent 53ed7cd commit 80cc227

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

R/package.R

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,7 @@ keras <- NULL
9696

9797
.onAttach <- function(libname, pkgname) {
9898
packageStartupMessage(
99-
"The keras package is deprecated. Use the keras3 package instead.",
100-
"To use legacy keras via py_require(), call py_require_legacy_keras() at the start of the R session."
99+
"The keras package is deprecated. Use the keras3 package instead."
101100
)
102101
}
103102

@@ -167,6 +166,9 @@ py_require_legacy_keras <- function(extra_packages = TRUE) {
167166
},
168167

169168
on_error = function(e) {
169+
message(
170+
"To use legacy Keras via py_require(), call py_require_legacy_keras() at the start of the R session."
171+
)
170172
if (is_tensorflow_implementation())
171173
stop(tf_config()$error_message, call. = FALSE)
172174
else {

0 commit comments

Comments
 (0)