Skip to content

Commit

Permalink
tests: skip irace tests (#278)
Browse files Browse the repository at this point in the history
* tests: skip irace tests

* ...
  • Loading branch information
be-marc authored Dec 10, 2024
1 parent b84523c commit 754de5f
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 6 deletions.
4 changes: 3 additions & 1 deletion R/OptimizerBatchIrace.R
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,9 @@
#'
#' @export
#' @examples
#' \donttest{
#' # currently there is bug in irace 4.0.0 that sometimes let the example crash
#' \dontrun{
#'
#' library(data.table)
#'
#' search_space = domain = ps(
Expand Down
4 changes: 3 additions & 1 deletion man/mlr_optimizers_irace.Rd

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

16 changes: 12 additions & 4 deletions tests/testthat/test_OptimizerIrace.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
test_that("OptimizerBatchIrace minimize works", {
skip_if(TRUE) # Remove this line when irace is fixed
skip_if_not_installed("irace")

search_space = domain = ps(
Expand All @@ -15,7 +16,7 @@ test_that("OptimizerBatchIrace minimize works", {
instance = OptimInstanceBatchSingleCrit$new(
objective = objective,
search_space = search_space,
terminator = trm("evals", n_evals = 200))
terminator = trm("evals", n_evals = 96))


optimizer = opt("irace", instances = rnorm(10, mean = 0, sd = 0.1))
Expand All @@ -39,6 +40,7 @@ test_that("OptimizerBatchIrace minimize works", {
})

test_that("OptimizerBatchIrace maximize works", {
skip_if(TRUE) # Remove this line when irace is fixed
skip_if_not_installed("irace")

search_space = domain = ps(
Expand All @@ -56,7 +58,7 @@ test_that("OptimizerBatchIrace maximize works", {
instance = OptimInstanceBatchSingleCrit$new(
objective = objective,
search_space = search_space,
terminator = trm("evals", n_evals = 200))
terminator = trm("evals", n_evals = 96))

optimizer = opt("irace", instances = rnorm(10, mean = 0, sd = 0.1))

Expand All @@ -79,6 +81,7 @@ test_that("OptimizerBatchIrace maximize works", {
})

test_that("OptimizerBatchIrace assertions works", {
skip_if(TRUE) # Remove this line when irace is fixed
skip_if_not_installed("irace")

search_space = domain = ps(
Expand Down Expand Up @@ -106,6 +109,7 @@ test_that("OptimizerBatchIrace assertions works", {
})

test_that("OptimizerBatchIrace works with passed constants set", {
skip_if(TRUE) # Remove this line when irace is fixed
skip_if_not_installed("irace")

search_space = domain = ps(
Expand All @@ -122,7 +126,7 @@ test_that("OptimizerBatchIrace works with passed constants set", {
instance = OptimInstanceBatchSingleCrit$new(
objective = objective,
search_space = search_space,
terminator = trm("evals", n_evals = 200))
terminator = trm("evals", n_evals = 96))

optimizer = opt("irace", instances = rnorm(10, mean = 0, sd = 0.1))

Expand All @@ -131,6 +135,7 @@ test_that("OptimizerBatchIrace works with passed constants set", {
})

test_that("OptimizerBatchIrace works without passed constants set", {
skip_if(TRUE) # Remove this line when irace is fixed
skip_if_not_installed("irace")

search_space = domain = ps(
Expand All @@ -147,7 +152,7 @@ test_that("OptimizerBatchIrace works without passed constants set", {
instance = OptimInstanceBatchSingleCrit$new(
objective = objective,
search_space = search_space,
terminator = trm("evals", n_evals = 200))
terminator = trm("evals", n_evals = 96))

optimizer = opt("irace", instances = rnorm(10, mean = 0, sd = 0.1))

Expand All @@ -157,6 +162,7 @@ test_that("OptimizerBatchIrace works without passed constants set", {


test_that("paradox_to_irace without dependencies", {
skip_if(TRUE) # Remove this line when irace is fixed
skip_if_not_installed("irace")

# only ParamLgl
Expand Down Expand Up @@ -198,6 +204,7 @@ test_that("paradox_to_irace without dependencies", {
})

test_that("paradox_to_irace with dependencies", {
skip_if(TRUE) # Remove this line when irace is fixed
skip_if_not_installed("irace")

# one dependency
Expand Down Expand Up @@ -250,6 +257,7 @@ test_that("paradox_to_irace with dependencies", {
})

test_that("paradox_to_irace works with parameters with multiple dependencies", {
skip_if(TRUE) # Remove this line when irace is fixed
skip_if_not_installed("irace")

pps = ps(
Expand Down

0 comments on commit 754de5f

Please sign in to comment.