Skip to content

Commit

Permalink
minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
t-kalinowski committed Jan 27, 2025
1 parent c483d3e commit 9124438
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions R/install.R
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ has_gpu <- function() {
has_nvidia_gpu <- function() {
lspci_listed <- tryCatch(
as.logical(length(
system("lspci | grep -i nvidia", intern = TRUE)
system("lspci | grep -i nvidia", intern = TRUE, ignore.stderr = TRUE)
)),
# warning emitted by system for non-0 exit status
warning = function(w) FALSE,
Expand All @@ -321,7 +321,7 @@ has_gpu <- function() {

# lspci doens't list GPUs on WSL Linux, but nvidia-smi does.
nvidia_smi_listed <- tryCatch(
system("nvidia-smi -L", intern = TRUE),
system("nvidia-smi -L", intern = TRUE, ignore.stderr = TRUE),
warning = function(w) character(),
error = function(e) character()
)
Expand Down
2 changes: 1 addition & 1 deletion R/package.R
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ print.tensorflow_config <- function(x, ...) {
if (x$available) {
aliased <- function(path) sub(Sys.getenv("HOME"), "~", path)
cat("TensorFlow v", x$version_str, " (", aliased(x$location), ")\n", sep = "")
cat("Python v", x$python_version, " (", aliased(x$python), ")\n", sep = "")
cat("Python v", as.character(x$python_version), " (", aliased(x$python), ")\n", sep = "")
} else {
cat(x$error_message, "\n")
}
Expand Down

0 comments on commit 9124438

Please sign in to comment.