Skip to content

Commit

Permalink
base learner documentation
Browse files Browse the repository at this point in the history
- "under construction" flag removed
- _targets.R and pipeline_base_functions.R in inst/targets are synchronized
  • Loading branch information
Insang Song committed Jun 13, 2024
1 parent aa96037 commit 526eaa1
Show file tree
Hide file tree
Showing 8 changed files with 3,739 additions and 1,700 deletions.
7 changes: 3 additions & 4 deletions R/pipeline_base_functions.R
Original file line number Diff line number Diff line change
Expand Up @@ -2205,8 +2205,7 @@ par_nest <-
#' and tidymodels. With proper settings, users can utilize graphics
#' processing units (GPU) to speed up the training process.
#' @keywords Baselearner
#' @note Spatiotemporal cross-validation strategy is not yet implemented.
#' tune package should be 1.2.0 or higher.
#' @note tune package should be 1.2.0 or higher.
#' @param dt_imputed The input data table to be used for fitting.
#' @param folds pre-generated rset object. If NULL, it should be
#' numeric to be used in [rsample::vfold_cv].
Expand Down Expand Up @@ -2303,7 +2302,7 @@ fit_base_brulee <-
#' With proper settings, users can utilize graphics
#' processing units (GPU) to speed up the training process.
#' @keywords Baselearner
#' @note Spatiotemporal cross-validation strategy is not yet implemented.
#' @note tune package should be 1.2.0 or higher.
#' @param dt_imputed The input data table to be used for fitting.
#' @param folds pre-generated rset object. If NULL, it should be
#' numeric to be used in [rsample::vfold_cv].
Expand Down Expand Up @@ -2390,7 +2389,7 @@ fit_base_xgb <-
#' Elastic net model is fitted at the defined rate (`r_subsample`) of
#' the input dataset by grid search.
#' @keywords Baselearner
#' @note Spatiotemporal cross-validation strategy is not yet implemented.
#' @note tune package should be 1.2.0 or higher.
#' @param dt_imputed The input data table to be used for fitting.
#' @param folds pre-generated rset object. If NULL, it should be
#' numeric to be used in [rsample::vfold_cv].
Expand Down
11 changes: 9 additions & 2 deletions _targets.R
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,18 @@ tar_source("inst/targets/targets_arglist.R")
# bypass option
Sys.setenv("BTV_DOWNLOAD_PASS" = "TRUE")

#
# bind custom built GDAL
# Users should export the right path to the GDAL library
# by export LD_LIBRARY_PATH=.... command.
.libPaths(
c(
"/ddn/gs1/biotools/R/lib64/R/custompkg",
.libPaths()
)
)

# arglist_common is generated by targets_arglist.R.
plan(
list(
tweak(
Expand Down Expand Up @@ -51,6 +55,8 @@ if (Sys.getenv("BTV_DOWNLOAD_PASS") == "TRUE") {
}

# targets options
# For GPU support, users should be aware of setting environment
# variables and GPU versions of the packages.
# TODO: check if the controller and resources setting are required
tar_option_set(
packages =
Expand All @@ -59,10 +65,11 @@ tar_option_set(
#"crew", "crew.cluster",
"tigris", "dplyr",
"future.batchtools", "qs", "collapse",
"tidymodels", "torch",
"tidymodels", "tune", "rsample", "torch", "brulee",
"glmnet", "xgboost",
"future", "future.apply", "future.callr", "callr",
#"sftime",
"stars", "rlang", "foreach", "parallelly"),
"stars", "rlang", "parallelly"),
library = c("/ddn/gs1/biotools/R/lib64/R/custompkg", "/ddn/gs1/home/songi2/r-libs"),
repository = "local",
error = "stop",
Expand Down
Loading

0 comments on commit 526eaa1

Please sign in to comment.