Skip to content

Commit 913ff5b

Browse files
authored
docs(learner): info on configuring runtime perf (#443)
1 parent 7572799 commit 913ff5b

File tree

4 files changed

+25
-3
lines changed

4 files changed

+25
-3
lines changed

R/LearnerTorch.R

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,17 @@
4444
#' * multi-class classification: The `factor` target variable of a [`TaskClassif`][mlr3::TaskClassif] is a label-encoded
4545
#' [`torch_long`][torch::torch_long] with shape `(batch_size)` where the label-encoding goes from `1` to `n_classes`.
4646
#'
47+
#' @section Important Runtime Considerations:
48+
#' There are a few hyperparameters settings that can have a considerable impact on the runtime of the learner.
49+
#' These include:
50+
#'
51+
#' * `device`: Use a GPU if possible.
52+
#' * `num_threads`: Set this to the number of CPU cores available if training on CPU.
53+
#' * `tensor_dataset`: Set this to `TRUE` (or `"device"` if on a GPU) if the dataset fits into memory.
54+
#' * `batch_size`: Especially for very small models, choose a larger batch size.
55+
#'
56+
#' Also, see the *Early Stopping and Internal Tuning* section for how to terminate training early.
57+
#'
4758
#' @template param_id
4859
#' @template param_task_type
4960
#' @template param_param_vals

man-roxygen/paramset_torchlearner.R

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@
6262
#' **Dataloader**:
6363
#' * `batch_size` :: `integer(1)`\cr
6464
#' The batch size (required).
65-
#' When working with small models or datasets, choosing a larger batch size can considerably speed up training.
6665
#' * `shuffle` :: `logical(1)`\cr
6766
#' Whether to shuffle the instances in the dataset. This is initialized to `TRUE`,
6867
#' which differs from the default (`FALSE`).

man/mlr_learners_torch.Rd

Lines changed: 14 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/mlr_pipeops_torch_model.Rd

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)