Skip to content

Commit

Permalink
init_py() updates
Browse files Browse the repository at this point in the history
init_py() installs python packages exclusively from conda-forge whenever possible. Packages from other channels will only be used if they are unavailable on conda-forge.
  • Loading branch information
mingdeyu committed Jan 7, 2025
1 parent 56098ee commit d6ba6dd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# dgpsi 2.5.0-9000 (development version)
- Prediction speed enhanced for small testing data sets by reducing overhead caused by the multi-threading implementation.
- Prediction speed with `predict()` enhanced for small testing data sets by reducing overhead caused by the multi-threading implementation.
- The Python environment now installs packages exclusively from conda-forge whenever possible. Packages from other channels will only be used if they are unavailable on conda-forge.

# dgpsi 2.5.0
- Training times for DGP emulators are now approximately 30%-40% faster.
Expand Down
6 changes: 3 additions & 3 deletions R/initi_py.R
Original file line number Diff line number Diff line change
Expand Up @@ -155,12 +155,12 @@ install_dgpsi <- function(env_name, py_ver, conda_path, dgpsi_ver, reinsatll = F
message("Installing the required Python packages ...")
}
if (Sys.info()[["sysname"]] == "Darwin" & Sys.info()[["machine"]] == "arm64"){
reticulate::conda_install(envname = env_name, packages = c(dgpsi_ver, '"libblas=*=*accelerate"') , conda = conda_path)
reticulate::conda_install(envname = env_name, packages = c(dgpsi_ver, '"libblas=*=*accelerate"') , conda = conda_path, forge = TRUE, additional_install_args = c('--strict-channel-priority'))
} else if (grepl("Intel",benchmarkme::get_cpu()$model_name)){
reticulate::conda_install(envname = env_name, packages = c(dgpsi_ver, '"libblas=*=*mkl"') , conda = conda_path)
reticulate::conda_install(envname = env_name, packages = c(dgpsi_ver, '"libblas=*=*mkl"') , conda = conda_path, forge = TRUE, additional_install_args = c('--strict-channel-priority') )
reticulate::conda_install(envname = env_name, packages = c('icc_rt') , channel = c("numba"), conda = conda_path)
} else {
reticulate::conda_install(envname = env_name, packages = c(dgpsi_ver) , conda = conda_path)
reticulate::conda_install(envname = env_name, packages = c(dgpsi_ver) , conda = conda_path, forge = TRUE, additional_install_args = c('--strict-channel-priority'))
}
if (grepl('9000',env_name)) {
if (reinsatll) {
Expand Down

0 comments on commit d6ba6dd

Please sign in to comment.