Skip to content

Commit

Permalink
simplify install_keras(), fix arm mac install
Browse files Browse the repository at this point in the history
  • Loading branch information
t-kalinowski committed Aug 11, 2023
1 parent 5b3fb54 commit fb938d8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 22 deletions.
19 changes: 4 additions & 15 deletions R/install.R
Original file line number Diff line number Diff line change
Expand Up @@ -24,22 +24,12 @@ install_keras <- function(method = c("auto", "virtualenv", "conda"),
version = "default",
tensorflow = version,
extra_packages = NULL,
...,
# envname = "r-keras",
# new_env = identical(envname, "r-keras"),
pip_ignore_installed = TRUE) {
...
# # envname = "r-keras",
# # new_env = identical(envname, "r-keras")
) {
method <- match.arg(method)

if(is_mac_arm64()) {
return(tensorflow::install_tensorflow(
method = method,
conda = conda,
version = version,
extra_packages = c(default_extra_packages(),
extra_packages),
...))
}

pkgs <- default_extra_packages(tensorflow)
if(!is.null(extra_packages)) # user supplied package version constraints take precedence
pkgs[gsub("[=<>~]{1,2}[0-9.]+$", "", extra_packages)] <- extra_packages
Expand All @@ -57,7 +47,6 @@ install_keras <- function(method = c("auto", "virtualenv", "conda"),
extra_packages = pkgs,
# envname = envname,
# new_env = new_env,
pip_ignore_installed = pip_ignore_installed,
...
)
}
Expand Down
8 changes: 1 addition & 7 deletions man/install_keras.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit fb938d8

Please sign in to comment.