Skip to content

Commit

Permalink
tests: skip irace tests (#481)
Browse files Browse the repository at this point in the history
  • Loading branch information
be-marc authored Dec 10, 2024
1 parent 06ca531 commit 85c1946
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
4 changes: 3 additions & 1 deletion R/TunerBatchIrace.R
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@
#'
#' # load learner and set search space
#' learner = lrn("classif.rpart", cp = to_tune(1e-04, 1e-1, logscale = TRUE))
#' \donttest{
#'
#' # currently there is bug in irace 4.0.0 that sometimes let the example crash
#' \dontrun{
#' # hyperparameter tuning on the pima indians diabetes data set
#' instance = tune(
#' tuner = tnr("irace"),
Expand Down
7 changes: 6 additions & 1 deletion tests/testthat/test_TunerBatchIrace.R
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
skip_if_not_installed("irace")

test_that("TunerIrace", {
z = test_tuner("irace", term_evals = 200)
skip_if(TRUE) # Remove this line when irace is fixed
z = test_tuner("irace", term_evals = 42)
instance = z$inst
archive = instance$archive$data
tuner = z$tuner
Expand All @@ -22,6 +23,7 @@ test_that("TunerIrace", {
})

test_that("TunerIrace works with dependencies", {
skip_if(TRUE) # Remove this line when irace is fixed
search_space = ps(
cp = p_dbl(lower = 0.001, upper = 0.1),
minsplit = p_int(lower = 1, upper = 10, depends = cp == 0.005)
Expand All @@ -42,6 +44,7 @@ test_that("TunerIrace works with dependencies", {
})

test_that("TunerIrace works with logical parameters", {
skip_if(TRUE) # Remove this line when irace is fixed
search_space = ps(
cp = p_dbl(lower = 0.001, upper = 0.1),
keep_model = p_lgl())
Expand All @@ -58,6 +61,7 @@ test_that("TunerIrace works with logical parameters", {
})

test_that("TunerIrace uses digits", {
skip_if(TRUE) # Remove this line when irace is fixed
search_space = ps(cp = p_dbl(lower = pi * 1e-20, upper = 5.242e12 / 1e13))
instance = ti(
task = tsk("mtcars"),
Expand All @@ -71,6 +75,7 @@ test_that("TunerIrace uses digits", {
})

test_that("TunerIrace works with unnamed discrete values", {
skip_if(TRUE) # Remove this line when irace is fixed
# we had a bug here, see (mlr) issue #627
search_space = ps(minsplit = p_int(lower = 2L, upper = 7L))
instance = ti(
Expand Down

0 comments on commit 85c1946

Please sign in to comment.