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

Error in ablation analysis #68

Closed
souzamarcelo opened this issue May 24, 2024 · 6 comments
Closed

Error in ablation analysis #68

souzamarcelo opened this issue May 24, 2024 · 6 comments

Comments

@souzamarcelo
Copy link

I am trying to run the ablation analysis from terminal. I get the following error message:

Error in do.call(ablation, args = c(list(iraceResults = iraceResults,  : 
  objeto 'scenario' não encontrado
Calls: ablation_cmdline -> do.call

It seems that the scenario object was not found in the irace log file (it is in there, though).

I am using irace version 3.5. I also tried the repository version; no success. I attached the irace.Rdata I am using here.

Cheers!

@MLopez-Ibanez
Copy link
Owner

Hi @souzamarcelo , could you tell me how you called ablation from the command-line? Using the version from github, I tried this:

ablation -l irace.Rdata 
#------------------------------------------------------------------------------
# ablation: An implementation in R of Ablation Analysis
# Version: 3.5.1.9000.fc9ee74e-dirty
# Copyright (C) 2020--2022
# Manuel Lopez-Ibanez     <[email protected]>
# Leslie Perez Caceres    <[email protected]>
#
# This is free software, and you are welcome to redistribute it under certain
# conditions.  See the GNU General Public License for details. There is NO
# WARRANTY; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#------------------------------------------------------------------------------
# installed at: /home/manu/R/x86_64-pc-linux-gnu-library/4.1/irace
# called with: -l irace.Rdata
Error: == irace == Unknown scenario parameters: forbiddenFile, targetRunnerLauncherArgs
Execution halted

The error above is expected as those scenario options have been renamed.

@souzamarcelo
Copy link
Author

I tried both commands given below.

First:

ablation -l irace.Rdata 
#------------------------------------------------------------------------------
# ablation: An implementation in R of Ablation Analysis
# Version: 3.5.6863679
# Copyright (C) 2020--2022
# Manuel Lopez-Ibanez     <[email protected]>
# Leslie Perez Caceres    <[email protected]>
#
# This is free software, and you are welcome to redistribute it under certain
# conditions.  See the GNU General Public License for details. There is NO
# WARRANTY; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#------------------------------------------------------------------------------
# installed at: /home/marcelo/R/x86_64-pc-linux-gnu-library/4.2/irace
# called with: -l irace.Rdata
Error in do.call(ablation, args = c(list(iraceResults = iraceResults,  : 
  objeto 'scenario' não encontrado
Calls: ablation_cmdline -> do.call
Execução interrompida

Second:

ablation -l irace.Rdata -s scenario.txt 
#------------------------------------------------------------------------------
# ablation: An implementation in R of Ablation Analysis
# Version: 3.5.6863679
# Copyright (C) 2020--2022
# Manuel Lopez-Ibanez     <[email protected]>
# Leslie Perez Caceres    <[email protected]>
#
# This is free software, and you are welcome to redistribute it under certain
# conditions.  See the GNU General Public License for details. There is NO
# WARRANTY; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#------------------------------------------------------------------------------
# installed at: /home/marcelo/R/x86_64-pc-linux-gnu-library/4.2/irace
# called with: -l irace.Rdata -s scenario.txt
# 2024-05-29 15:16:30 -03: Starting ablation from 1 to 69
# Seed: 1234567
Error in n_instances * scenario$firstTest : 
  argumento não-numérico para operador binário
Calls: ablation_cmdline -> do.call -> <Anonymous>
Execução interrompida

@MLopez-Ibanez
Copy link
Owner

Could you try with the version in github? It should show as 3.5.1.9000.

@souzamarcelo
Copy link
Author

Here is the error using the github version (same as yours).

ablation -l irace.Rdata -s scenario.txt 
#------------------------------------------------------------------------------
# ablation: An implementation in R of Ablation Analysis
# Version: 3.5.1.9000.5836c799f68bd2fe67cd737f6f9137d76a31d499
# Copyright (C) 2020--2022
# Manuel Lopez-Ibanez     <[email protected]>
# Leslie Perez Caceres    <[email protected]>
#
# This is free software, and you are welcome to redistribute it under certain
# conditions.  See the GNU General Public License for details. There is NO
# WARRANTY; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#------------------------------------------------------------------------------
# installed at: /home/marcelo/R/x86_64-pc-linux-gnu-library/4.2/irace
# called with: -l irace.Rdata -s scenario.txt
Erro: == irace == Unknown scenario settings: forbiddenFile, targetRunnerLauncherArgs
Execução interrompida

I give the scenario file here. I did not define a forbiddenFile or any target runner additional argument.

@MLopez-Ibanez
Copy link
Owner

Here is the error using the github version (same as yours).
I give the scenario file here. I did not define a forbiddenFile or any target runner additional argument.

Some scenario options have been removed or will change in the next version of irace. Try this:

library(irace)
iraceResults <- read_logfile("irace.Rdata")
iraceResults$scenario$targetRunnerLauncher <- NULL
iraceResults$scenario$targetRunnerLauncherArgs <- NULL
iraceResults$scenario$forbiddenFile <- NULL
save(iraceResults, file="irace2.Rdata")
ablation_cmdline("-l irace2.Rdata")

@souzamarcelo
Copy link
Author

Now it works, thank you!

I think it would be great to update the ablation function in the current version, to work according to the current structure of the iraceResults. In any case, I am closing this issue.

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