Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(learner): initialize shuffle to TRUE #349

Merged
merged 2 commits into from
Feb 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
* feat: `PipeOpBlock` should no longer create ID clashes with other PipeOps in the graph (#260)
* fix: `device` is no longer part of the `dataset` which allows for parallel dataloading
on GPUs.
* feat: The `shuffle` parameter during model training is now initialized to `TRUE`.

# mlr3torch 0.1.2

Expand Down
2 changes: 1 addition & 1 deletion R/paramset_torchlearner.R
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ paramset_torchlearner = function(task_type) {
min_delta = p_dbl(lower = 0, tags = c("train", "required"), init = 0),
# dataloader parameters
batch_size = p_int(tags = c("train", "predict", "required"), lower = 1L),
shuffle = p_lgl(tags = "train", default = FALSE),
shuffle = p_lgl(tags = "train", default = FALSE, init = TRUE),
sampler = p_uty(tags = c("train", "predict")),
batch_sampler = p_uty(tags = c("train", "predict")),
num_workers = p_int(lower = 0, default = 0, tags = c("train", "predict")),
Expand Down
4 changes: 2 additions & 2 deletions man-roxygen/paramset_torchlearner.R
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@
#' * `batch_size` :: `integer(1)`\cr
#' The batch size (required).
#' * `shuffle` :: `logical(1)`\cr
#' Whether to shuffle the instances in the dataset. Default is `FALSE`.
#' This does not impact validation.
#' Whether to shuffle the instances in the dataset. This is initialized to `TRUE`,
#' which differs from the default (`FALSE`).
#' * `sampler` :: [`torch::sampler`]\cr
#' Object that defines how the dataloader draw samples.
#' * `batch_sampler` :: [`torch::sampler`]\cr
Expand Down
4 changes: 2 additions & 2 deletions man/mlr_learners_torch.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/mlr_pipeops_torch_model.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading