Skip to content

Commit 2a36468

Browse files
committed
fix tests
1 parent 91e73f0 commit 2a36468

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

DESCRIPTION

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ Suggests:
7070
viridis,
7171
visNetwork,
7272
testthat (>= 3.0.0),
73+
tibble,
7374
tfevents,
7475
torchvision (>= 0.6.0),
7576
waldo

R/TorchOptimizer.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ mlr3torch_optimizers$add("adamw",
254254
lr = p_dbl(default = 0.001, lower = 0, upper = Inf, tags = "train"),
255255
betas = p_uty(default = c(0.9, 0.999), tags = "train", custom_check = check_betas),
256256
eps = p_dbl(default = 1e-08, lower = 1e-16, upper = 1e-4, tags = "train"),
257-
weight_decay = p_dbl(default = 0, lower = 0, upper = 1, tags = "train"),
257+
weight_decay = p_dbl(default = 0.01, lower = 0, upper = 1, tags = "train"),
258258
amsgrad = p_lgl(default = FALSE, tags = "train")
259259
)
260260
TorchOptimizer$new(

tests/testthat/test_CallbackSetTB.R

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ test_that("autotest", {
1010
})
1111

1212
test_that("metrics are logged correctly", {
13+
skip_if_not_installed("tibble")
1314
cb = t_clbk("tb")
1415

1516
task = tsk("iris")
@@ -44,6 +45,7 @@ test_that("metrics are logged correctly", {
4445
})
4546

4647
test_that("eval_freq works", {
48+
skip_if_not_installed("tibble")
4749
task = tsk("iris")
4850

4951
n_epochs = 9
@@ -78,6 +80,7 @@ test_that("eval_freq works", {
7880
})
7981

8082
test_that("we can disable training loss tracking", {
83+
skip_if_not_installed("tibble")
8184
task = tsk("iris")
8285

8386
mlp = lrn("classif.mlp",

0 commit comments

Comments
 (0)