What we did: renamed the file to target-runner-windows.bat, then we got errors like “exec not …”. Alright, then we removed the exec. Then we had problems with the %candidate…% not being recognised, so we hardcoded it (just to get it to run once). Then irace said “echo is off”. For fun I used @echo on in a random position, however, I did not get lucky. Also, %candidate…% seemed to contain *all* parameters, not only the configuration, so our python script was not happy with the unknown parameters.".
I did some modifications in target-runner.bat and all the things worked very well, i.e., the execution of instructions in R "> checkIraceScenario(scenario=scenario)" and "> irace(scenario = scenario, parameters = parameters)".
Basically, two parts of the script were modified:
1. I replaced this part:
SET candidate=%1
SHIFT
SET instance_id=%1
SHIFT
SET seed=%1
SHIFT
SET instance=%1
SHIFT
SET candidate_parameters=%*
by this:
FOR /f "tokens=1-4*" %%a IN ("%*") DO (
SET candidate=%%a
SET instance_id=%%b
SET seed=%%c
SET instance=%%d
SET candidate_parameters=%%e
)
2. I also replaced this part:
%exe% %FIXED_PARAMS% -i %instance% --seed %seed% %candidate_parameters% 1>%stdout% 2>%stderr%
By this:
%exe% %fixed_params% -i %instance% --seed %seed% %candidate_parameters% 1>%stdout% 2>%stderr%
In 1., the reason is that "%*" will always expand to all original parameters, sadly.
In 2., although variable names are not case-sensitive in Windows batch script, I decided, for the reason of coherence, keep the same spelling for the same variable ("fixed_params" appears in lower case at the beginning of the script).
I can send you the target-runner file if you want (I think I cannot attach it here in this group).
Best wishes,
Andre