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

Add support for irace v4 #226

Open
MLopez-Ibanez opened this issue Mar 27, 2024 · 2 comments
Open

Add support for irace v4 #226

MLopez-Ibanez opened this issue Mar 27, 2024 · 2 comments

Comments

@MLopez-Ibanez
Copy link

Hi,

The next version of irace: https://github.com/MLopez-Ibanez/irace/tree/v4
will have some breaking changes: https://mlopez-ibanez.github.io/irace/news/index.html

The list is not complete yet but among them, there is the call to irace() here:

bbotk/R/OptimizerIrace.R

Lines 182 to 185 in 70f3f96

scenario = c(list(maxExperiments = terminator$param_set$values$n_evals, targetRunnerData = list(inst = inst)), pv)
# run irace
res = invoke(irace::irace, scenario = scenario, parameters = paradox_to_irace(inst$search_space, pv$digits), .opts = allow_partial_matching)

that should be replaced by:

      scenario = c(list(maxExperiments = terminator$param_set$values$n_evals, targetRunnerData = list(inst = inst), parameters = paradox_to_irace(inst$search_space, pv$digits)), pv)
      # run irace
      res = invoke(irace::irace, scenario = scenario, .opts = allow_partial_matching)

Also, a few lines below, instead of load() you can use iraceResults = read_logfile() introduced in irace 3.5

@be-marc
Copy link
Member

be-marc commented Apr 9, 2024

Hey, thanks for the information. I assume you are uploading to CRAN and we have 2 weeks to upload bbotk with the changes? If there are any more changes please let me know.

@MLopez-Ibanez
Copy link
Author

It will still take some time to reach CRAN. Probably not before June. Other changes that may be relevant to you:

  • Requires R version >= 3.6.0.

  • Logfiles *.Rdata use format version 3, which can only be read by R version >= 3.5.

  • The scenario options forbiddenFile and forbiddenExps have been removed
    and will give an error if present. Forbidden configurations are now
    specified in the parameter space description. See the example in
    readParameters().

  • The scenario option digits has been removed and will give an error if
    present. The number of digits for real-valued parameters is now specified
    in the parameter space description. See the example in readParameters().

  • The scenario object now includes the parameters object. Thus
    functions such as irace(), which previously took as arguments both
    scenario and parameters, now only take scenario. This also means that
    the log file irace.Rdata does not contain a separate parameters element
    since this element can now be found within scenario.

  • irace warns about using '&&' and '||' instead of '&' and '|' in
    parameter conditions and forbidden expressions. A future version of irace
    will reject those uses as errors.

  • The column "instance" of the instancesList data frame stored in the
    logFile has been renamed to "instanceID". This data frame should not be
    accessed directly. Instead use the new function
    get_instanceID_seed_pairs().

  • irace is now more strict in enforcing runtime bounds given with scenario$boundMax and will stop with an error if the target-runner reports a runtime larger than the given bound.

  • All functions that contained a period ('.') in the name have been renamed to use '_' instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants