Skip to content

Commit 12feda6

Browse files
committed
...
1 parent 0499c6b commit 12feda6

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

paper/benchmark/benchmark.R

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,11 @@ print_setup_info = function(reg_path, python_path, work_dir) {
119119
cat(" Python Path:", python_path, " (", if (file.exists(python_path)) "exists" else "does not exist", ")\n")
120120
cat(" Work Directory:", work_dir, "\n\n")
121121
cat("Cuda is available:", torch::cuda_is_available(), "\n")
122-
reticulate::use_python(python_path, required = TRUE)
123-
reticulate::source_python(here::here("benchmark", "time_pytorch.py"))
124-
print(reticulate::py_config())
122+
out <- callr::r(function() {
123+
reticulate::use_python(python_path, required = TRUE)
124+
reticulate::source_python(here::here("benchmark", "time_pytorch.py"))
125+
return(reticulate::py_config())
126+
}, show = TRUE)
127+
cat("Python configuration:\n")
128+
print(out)
125129
}

0 commit comments

Comments
 (0)