diff --git a/NEWS.md b/NEWS.md index 006a338..7c1a203 100644 --- a/NEWS.md +++ b/NEWS.md @@ -13,6 +13,9 @@ and if so, and installs cuDNN, updates "~/.profile", and emits additional instructions for how to install the necessary CUDA drivers to enable GPU usage. Set new arg `configure_cuda_vars=FALSE` to disable. + - `pip_ignore_installed` default is now `FALSE` again. + - On Arm Macs (M1/M2), the default tensorflow package is once again installed, + rather than `tensorflow-macos` and `tensorflow-metal`. - New `pillar:type_sum()` method for Tensors, giving a more informative printout of Tensors in R tracebacks and tibbles. diff --git a/R/install.R b/R/install.R index 4422f46..0a8c767 100644 --- a/R/install.R +++ b/R/install.R @@ -25,16 +25,12 @@ #' Sys.setenv("RETICULATE_PYTHON" = "~/path/to/python-env/bin/python") #' ``` #' -#' @section Apple Silicon: Tensorflow on Apple Silicon is not officially -#' supported by the Tensorflow maintainers. However Apple has published a -#' custom version of Tensorflow compatible with Arm Macs. -#' `install_tensorflow()` will install the special packages `tensorflow-macos` -#' and `tensorflow-metal` on Arm Macs. See +#' @section Apple Silicon: Beginning with Tensorflow version 2.13, the default +#' tensorflow package now works on Apple Silicon. See #' \url{https://developer.apple.com/metal/tensorflow-plugin/} for instructions -#' on how to do the equivalent manually. Please note that this is an -#' experimental build of both Python and Tensorflow, with known issues. In -#' particular, certain operations will cause errors, but can often be remedied -#' by pinning them to the CPU. For example: +#' on how to install older versions of Tensorflow on macOS. Please note that +#' not all operations are supported on Arm Mac GPUs. You can work around the +#' missing operations by pinning operations to CPU. For example: #' #' ```` R #' x <- array(runif(64*64), c(1, 64, 64)) @@ -232,7 +228,6 @@ function(method = c("auto", "virtualenv", "conda"), msg <- "# Configured by the R function tensorflow::install_tensorflow()" if(!all(c(msg, vars) %in% profile)) { - browser() profile <- c(profile, "", msg, vars, "") writeLines(profile, "~/.profile") message("- Updated file '~/.profile' with new environment variables.") diff --git a/man/install_tensorflow.Rd b/man/install_tensorflow.Rd index 0848a95..115db65 100644 --- a/man/install_tensorflow.Rd +++ b/man/install_tensorflow.Rd @@ -14,7 +14,7 @@ install_tensorflow( conda_python_version = NULL, ..., configure_cuda_vars = NULL, - pip_ignore_installed = TRUE, + pip_ignore_installed = FALSE, new_env = identical(envname, "r-tensorflow"), python_version = NULL ) @@ -108,16 +108,12 @@ commonly by setting an environment variable: } \section{Apple Silicon}{ - Tensorflow on Apple Silicon is not officially -supported by the Tensorflow maintainers. However Apple has published a -custom version of Tensorflow compatible with Arm Macs. -\code{install_tensorflow()} will install the special packages \code{tensorflow-macos} -and \code{tensorflow-metal} on Arm Macs. See + Beginning with Tensorflow version 2.13, the default +tensorflow package now works on Apple Silicon. See \url{https://developer.apple.com/metal/tensorflow-plugin/} for instructions -on how to do the equivalent manually. Please note that this is an -experimental build of both Python and Tensorflow, with known issues. In -particular, certain operations will cause errors, but can often be remedied -by pinning them to the CPU. For example: +on how to install older versions of Tensorflow on macOS. Please note that +not all operations are supported on Arm Mac GPUs. You can work around the +missing operations by pinning operations to CPU. For example: \if{html}{\out{
}}\preformatted{x <- array(runif(64*64), c(1, 64, 64)) keras::layer_random_rotation(x, .5) # Error: