Re: question of ACOTSP examples

616 views
Skip to first unread message
Message has been deleted

Leslie Perez Caceres

unread,
Oct 16, 2017, 4:56:09 AM10/16/17
to The irace package: Iterated Racing for Automatic Configuration
Hello,

When using windows you need to change the target runner of the example for a script that can be executed in windows.
We provide a template of a target runner for windows in the that is called target-runner.bat in the templates folder.

I hope this can help you!

Bests,


On Monday, 16 October 2017 10:46:21 UTC+2, zhenxi...@gmail.com wrote:
hi,
my last qustion about the making the target-runner excutable under windows system has been resolved when I change to the Linux system.I really appreciate for your reply.
But when I follow the user guide to run the ACOTSP example I met another difficult.After I finished all the preparation work and excuted irce, I got the the result below:

*******************************************************************************
* irace: An implementation in R of Iterated Race
* Version: 2.4.1844
* Copyright (C) 2010-2017
* Manuel Lopez-Ibanez     <manuel.lopez-ibanez@manchester.ac.uk>
* Jeremie Dubois-Lacoste  
* Leslie Perez Caceres    <leslie.per...@ulb.ac.be>
*
* 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.
*
* irace builds upon previous code from the race package:
*
* race: Racing methods for the selection of the best
* Copyright (C) 2003 Mauro Birattari
*******************************************************************************
# installed at: /home/xingchi/R/x86_64-pc-linux-gnu-library/3.4/irace
# called with: 
Warning: A default scenario file './scenario.txt' has been found and will be read
# 2017-10-16 15:23:32 CST: Initialization
# Elitist race
# Elitist new instances: 1
# Elitist limit: 2
# nbIterations: 5
# minNbSurvival: 5
# nbParameters: 11
# seed: 1247365718
# confidence level: 0.95
# budget: 5000
# mu: 5
# deterministic: FALSE

# 2017-10-16 15:23:32 CST: Iteration 1 of 5
# experimentsUsedSoFar: 0
# remainingBudget: 5000
# currentBudget: 1000
# nbConfigurations: 166
  Markers:
     x No test is performed.
     - The test is performed and some configurations are discarded.
     = The test is performed but no configuration is discarded.
     ! The test is performed and configurations could be discarded but elite configurations are preserved.
                                                                   
+-+-----------+-----------+-----------+---------------+-----------+--------+-----+----+------+
| |   Instance|      Alive|       Best|      Mean best| Exp so far|  W time|  rho|KenW|  Qvar|
+-+-----------+-----------+-----------+---------------+-----------+--------+-----+----+------+
Error: == irace == running command ''/home/xingchi/Downloads/irace/inst/templates/tuning/target-runner' 1 78 2001598658 /home/xingchi/Downloads/irace/inst/templates/tuning/Instances/2000-38.tsp  --ras --localsearch 3 --alpha 4.43 --beta 5.65 --rho  0.78 --ants 52 --nnls 48 --dlb 1 --rasranks 46 2>&1' had status 1
== irace == The call to targetRunner was:
/home/xingchi/Downloads/irace/inst/templates/tuning/target-runner 1 78 2001598658 /home/xingchi/Downloads/irace/inst/templates/tuning/Instances/2000-38.tsp  --ras --localsearch 3 --alpha 4.43 --beta 5.65 --rho  0.78 --ants 52 --nnls 48 --dlb 1 --rasranks 46
== irace == The output was:
2017骞?10鏈?16鏃?鏄熸湡涓€ 07:23:32 UTC: error: /home/xingchi/bin/acotsp: not found or not executable (pwd: /home/xingchi/Downloads/irace/inst/templates/tuning/acotsp-arena)
== irace == This is not a bug in irace, but means that something failed when running the command(s) above or they were terminated before completion. Try to run the command(s) above from the execution directory '/home/xingchi/Downloads/irace/inst/templates/tuning/acotsp-arena' to investigate the issue.
Execution halted

in another discussion, I found someone who also had the same question with me and he gave the resolution.but I still don't know how to solve it. 


zhenxi...@gmail.com

unread,
Oct 16, 2017, 6:25:12 AM10/16/17
to The irace package: Iterated Racing for Automatic Configuration
I really appreciate for your help 

在 2017年10月16日星期一 UTC+8下午4:56:09,Leslie Perez Caceres写道:
Hello,

When using windows you need to change the target runner of the example for a script that can be executed in windows.
We provide a template of a target runner for windows in the that is called target-runner.bat in the templates folder.

I hope this can help you!

Bests,


On Monday, 16 October 2017 10:46:21 UTC+2, zhenxi...@gmail.com wrote:
hi,
my last qustion about the making the target-runner excutable under windows system has been resolved when I change to the Linux system.I really appreciate for your reply.
But when I follow the user guide to run the ACOTSP example I met another difficult.After I finished all the preparation work and excuted irce, I got the the result below:

*******************************************************************************
* irace: An implementation in R of Iterated Race
* Version: 2.4.1844
* Copyright (C) 2010-2017
* Manuel Lopez-Ibanez     <manuel.lo...@manchester.ac.uk>

Manuel López-Ibáñez

unread,
Oct 16, 2017, 6:31:04 AM10/16/17
to irace-...@googlegroups.com
On 16/10/17 09:07, zhenxi...@gmail.com wrote:
> hi,
> my last qustion about the making the target-runner excutable under windows
> system has been resolved when I change to the Linux system.I really appreciate
> for your reply.
> But when I follow the user guide to run the ACOTSP example I met another
> difficult.After I finished all the preparation work and excuted irce, I got the
> the result below:
[snip]
> == irace == The output was:
> 2017骞?10鏈?16鏃?鏄熸湡涓€ 07:23:32 UTC: error: /home/xingchi/bin/acotsp: not
> found or not executable (pwd:
> /home/xingchi/Downloads/irace/inst/templates/tuning/acotsp-arena)
> == irace == This is not a bug in irace, but means that something failed when
> running the command(s) above or they were terminated before completion. Try to
> run the command(s) above from the execution directory
> '/home/xingchi/Downloads/irace/inst/templates/tuning/acotsp-arena' to
> investigate the issue.
> Execution halted
>
> in another discussion, I found someone who also had the same question with me
> and he gave the resolution.but I still don't know how to solve it.

The above means that /home/xingchi/bin/acotsp was not found or it is not
executable. After you have downloaded ACOTSP and compiled it, is executable
"acotsp" program located in /home/xingchi/bin/ ?

If not, then you need to either copy it to that location, create a symlink at
that location or edit
/home/xingchi/Downloads/irace/inst/templates/tuning/target-runner to update the
path.

Please, see the troubleshooting section in the user guide. This question and
similar ones are answered there.

Cheers,

Manuel.

zhenxi...@gmail.com

unread,
Oct 20, 2017, 3:44:19 AM10/20/17
to The irace package: Iterated Racing for Automatic Configuration
Hi Manuel,

Thank you for your reply. I have successfully executed the ACOTSP example on my computer. I used 15hours to execute the example with the maxExperiments = 5000, but I still not got the best result. And I don’t know why it spent so much time. 
the last execution result shows below:
# 2017-10-20 01:26:20 CST: Stopped because there is not enough budget left to race more than the minimum (5)
# You may either increase the budget or set 'minNbSurvival' to a lower value
# Iteration: 10
# nbIterations: 10
# experimentsUsedSoFar: 4978
# timeUsed: 0
# remainingBudget: 22
# currentBudget: 22
# number of elites: 5
# nbConfigurations: 5
# Best configurations (first number is the configuration ID; listed from best to worst according to the sum of ranks):
    algorithm localsearch alpha beta  rho ants nnls q0 dlb rasrank elitistants
674       ras           2  2.81 2.34 0.95   73   38 NA   1      14          NA
768       ras           2  3.09 2.19 0.99   76   43 NA   1      14          NA
728       ras           2  3.32 4.70 0.93   74   35 NA   1       9          NA
771       ras           2  3.64 4.37 0.98   71   38 NA   1      13          NA
727       ras           2  3.02 2.17 0.94   73   44 NA   1      18          NA
# Best configurations as commandlines (first number is the configuration ID; same order as above):
674  --ras --localsearch 2 --alpha 2.81 --beta 2.34 --rho  0.95 --ants 73 --nnls 38 --dlb 1 --rasranks 14
768  --ras --localsearch 2 --alpha 3.09 --beta 2.19 --rho  0.99 --ants 76 --nnls 43 --dlb 1 --rasranks 14
728  --ras --localsearch 2 --alpha 3.32 --beta 4.7 --rho  0.93 --ants 74 --nnls 35 --dlb 1 --rasranks 9
771  --ras --localsearch 2 --alpha 3.64 --beta 4.37 --rho  0.98 --ants 71 --nnls 38 --dlb 1 --rasranks 13
727  --ras --localsearch 2 --alpha 3.02 --beta 2.17 --rho  0.94 --ants 73 --nnls 44 --dlb 1 --rasranks 18
xingchi@bigdog:~/Downloads/irace/inst/templates/tuning$ 
     
And my second question is:
The reason why I use Irace is to tune parameters in my optimization algorithm. The problem I researched was one of the combinatorial optimization problems and I used Tabu Search Algorithms to resolve it. Now I want to select the appropriate parameters in my algorithms to illustrate the parameter setting in my algorithm. I have the program compiled by python and benchmark instances, but I don’t know what I need to do next if I want to use the configuration method in Irace to analyze my algorithm, especially in setting the scenario file and the targetRunner file.

Best Regards,
Zhenxi 


在 2017年10月16日星期一 UTC+8下午6:31:04,Manuel López-Ibáñez写道:

Manuel López-Ibáñez

unread,
Oct 20, 2017, 6:29:50 AM10/20/17
to zhenxi...@gmail.com, The irace package: Iterated Racing for Automatic Configuration
Dear Zhenxi,

I think the default time limit of each target-runner run of the ACOTSP example is 60s, multiplied by 5000 runs; it is much more than 15h if not parallelised. What do you mean by the best result? The best configurations look ok to me.

Regarding how to convert the ACOTSP example to your case, please take a look at the user guide. Each element is explained there, otherwise, let us know.

In a nutshell, if you use default options for the rest, you need to define in the scenario file the budget, put your training instances in ./Instances,  and you need to write a parameters.txt and a target-runner. In the most basic case, that's all. If you know python, you can write your target-runner in python.

Cheers,

Manuel.

zhenxi...@gmail.com

unread,
Nov 9, 2017, 7:27:54 AM11/9/17
to The irace package: Iterated Racing for Automatic Configuration
Dear Manuel,
Sorry to interrrupt you once again. When I output my result I always run into trouble.like below:

>getFnalElites(logFile = "irace-output.Rdata",n=0)
Error in getFinalElites(logFile = "irace-output.Rdata",:
  could not find function "getFinalElites"
>
I don't know why it gets this kind of error. and I am looking forward to your reply
Best Regards
Zhenxi

在 2017年10月20日星期五 UTC+8下午6:29:50,Manuel López-Ibáñez写道:

Manuel López-Ibáñez

unread,
Nov 9, 2017, 9:37:34 AM11/9/17
to The irace package: Iterated Racing for Automatic Configuration
Dear Zhenxi,

This is a small bug in the current version 2.4, where we forgot to export this particular function. You can fix it by either editing the file NAMESPACE in the sources and re-building and re-installing the package or even simpler: just use irace:::getFinalElites (with irace:::FUNCTION you will have access to any internal function of the package, but internal functions may change between releases nor documented, so be careful).

The error is already fixed in the next version of irace 2.5 that we hope to release it before the end of the year.

Cheers,

Manuel.



zhenxi...@gmail.com

unread,
Dec 1, 2017, 3:03:43 AM12/1/17
to The irace package: Iterated Racing for Automatic Configuration
Dear Manuel,

I want to know if you had successfully executed the ACOTSP example using the target-runner.py (or target-runner-advanced.py) instead of  the target-runner in acotsp document. I have tried to execute the ACOTSP example like this but I failed. I did't know why it happened like this.


Best Regards,
Zhenxi.

在 2017年11月9日星期四 UTC+8下午10:37:34,Manuel López-Ibáñez写道:

Manuel López-Ibáñez

unread,
Dec 1, 2017, 6:53:06 AM12/1/17
to irace-...@googlegroups.com
Dear Zhenxi,

The target-runner-advanced.py needs to be edited to handle ACOTSP. In
particular, you need to edit the "parse_output" function to parse the correct
output and the executable and fixed_params variables. Also, you need to prepend
"-i " to the instance name so that ACOTSP knows how to read it. The same
applies to target-runner.py: The pattern that matches the output has to match
the best solution value found by ACOTSP.

Please, let me know if you manage or not to make it work.

Cheers,

Manuel.
> --
> You received this message because you are subscribed to the Google Groups "The
> irace package: Iterated Racing for Automatic Configuration" group.
> To unsubscribe from this group and stop receiving emails from it, send an email
> to irace-packag...@googlegroups.com
> <mailto:irace-packag...@googlegroups.com>.
> To view this discussion on the web, visit
> https://groups.google.com/d/msgid/irace-package/a7e45ee6-c77b-4b5d-a8af-07327552ef0e%40googlegroups.com
> <https://groups.google.com/d/msgid/irace-package/a7e45ee6-c77b-4b5d-a8af-07327552ef0e%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout.

Message has been deleted

zhenxi...@gmail.com

unread,
Dec 3, 2017, 6:15:20 AM12/3/17
to The irace package: Iterated Racing for Automatic Configuration
Dear Manuel,

Thank you for your reply. I used your method but I still didn't know how to edit the "parse_output"function,so I only corrected it like below and also resulted in error output:

def parse_output(out):
    # parsing last thing printed
    # return out.strip().split()[-1]
    return out

def is_exe(fpath):
    return os.path.isfile(fpath) and os.access(fpath, os.X_OK) \
        and os.path.getsize(fpath) > 0

if __name__=='__main__':

    bindir = os.path.dirname(os.path.realpath(__file__))
    
    # reading parameters and setting problem specific stuff
    rootdir = bindir + "/home/xingchi/Downloads/irace/inst/templates/tuning/ACOTSP-1.03/acotsp/"
    timeout = 180
    candidate = sys.argv[1]
    instanceid = sys.argv[2]
    seed = sys.argv[3]
    instance = sys.argv[4]
    parameters = sys.argv[5:]

    executable = '/home/xingchi/Downloads/irace/inst/templates/tuning/target-runner-advanced.py' + candidate
    fixed_params = 'grammars/PFSPWCT.xml None 20 0 ' + seed


ouput result:
+-+-----------+-----------+-----------+---------------+-----------+--------+-----+----+------+
| |   Instance|      Alive|       Best|      Mean best| Exp so far|  W time|  rho|KenW|  Qvar|
+-+-----------+-----------+-----------+---------------+-----------+--------+-----+----+------+
Error : == irace == error in running command
== irace == The call to targetRunner was:
/home/xingchi/Downloads/irace/inst/templates/tuning/target-runner-advanced.py 1 20 836563607 /home/xingchi/Downloads/irace/inst/templates/tuning/Instances-i/2000-140.tsp  --ras --localsearch 2 --alpha 0.2486 --beta 4.0345 --rho  0.1026 --ants 13 --nnls 48 --dlb 0 --rasranks 40
== irace == The output was:
NULL, NULL, error in running command, NULL, /home/xingchi/Downloads/irace/inst/templates/tuning/target-runner-advanced.py 1 20 836563607 /home/xingchi/Downloads/irace/inst/templates/tuning/Instances-i/2000-140.tsp  --ras --localsearch 2 --alpha 0.2486 --beta 4.0345 --rho  0.1026 --ants 13 --nnls 48 --dlb 0 --rasranks 40
== irace == This is not a bug in irace, but means that something failed in a call to the targetRunner or targetEvaluator functions provided by the user. Please check those functions carefully.
 Error : == irace == error in running command
== irace == The call to targetRunner was:
/home/xingchi/Downloads/irace/inst/templates/tuning/target-runner-advanced.py 2 20 836563607 /home/xingchi/Downloads/irace/inst/templates/tuning/Instances-i/2000-140.tsp  --as --localsearch 3 --alpha 1.4293 --beta 8.6768 --rho  0.4751 --ants 19 --nnls 39 --dlb 0
== irace == The output was:
...............................

Best Regards,

Zhenxi

在 2017年12月1日星期五 UTC+8下午7:53:06,Manuel López-Ibáñez写道:

Manuel López-Ibáñez

unread,
Dec 3, 2017, 8:59:50 AM12/3/17
to The irace package: Iterated Racing for Automatic Configuration
Parsing the output of ACOTSP is more complex than just returning the whole output. You need to parse the number after "Best ". Also, you need to set-up the parameters in such a way that the instance is preceded by "-i " and the seed by " --seed ". I have updated the python target-runner to make this work. However, you still need to edit the executable variable to point to the path of the acotsp executable in your computer (in my computer it is "~/bin/acotsp").

These examples will be in the next irace version.

I hope this helps,

Manuel.

target-runner.py
target-runner-advanced.py

Manuel López-Ibáñez

unread,
Dec 4, 2017, 3:26:49 AM12/4/17
to The irace package: Iterated Racing for Automatic Configuration

Dear Zhenxi,

Independently of the language used in your program, there are two options:

1) Either you create a targetRunner program that calls your program (like target-runner-advandced.py calls ACOTSP). You can also modify target-runner-advandced.py to call your program instead of ACOTSP;

2) or you modify your program so that its input/output behaves like targetRunner (section 5.2.1) and you use your program as the targetRunner.

Cheers,

Manuel.


On 04/12/17 08:14, zhenxixiawhut wrote:
> Dear Manuel,
>
> Thank you for your help.I have successfullly executed the ACOTSP example with
> target-runner-advanced.py. But I still have another question. My target
> algorithm was written in python so it means that I need to configure a python
> algorithm with irace.but in your user guide there was no solution about how to
> achieve this.
>
> Best Regards,
> Zhenxi
>

zhenxi...@gmail.com

unread,
Dec 5, 2017, 2:59:31 AM12/5/17
to The irace package: Iterated Racing for Automatic Configuration
Dear Manuel,

Thank you for your suggestion. I have been learning python for one year by myself and maybe I didn't have a solid foundation on it. In the target-runner-advanced.py program I couldn't see how it realize to call ACOTSP. So I really want to know how you use the target-runner-advanced.py to call ACOTSP.

Best Regards,
Zhenxi 




在 2017年12月4日星期一 UTC+8下午4:26:49,Manuel López-Ibáñez写道:

Manuel López-Ibáñez

unread,
Dec 6, 2017, 4:34:41 AM12/6/17
to The irace package: Iterated Racing for Automatic Configuration
The line:

    runner = Runner(executable, candidate_id, instance_id, seed,
                    parameters, parse_output, max_tests,
                    #log_level = logging.DEBUG,
                    maximize = False)

creates an object, see where each variable is defined. For example:

    executable = '~/bin/acotsp'

and

    parameters = [' -i ' + instance + ' --seed ' + seed + fixed_params ] + parameters

then

    runner.run()

takes care of running the executable with the variables passed to the object runner.

You should only need to edit the code under:
# ------------------------------- CHANGE BELOW! ------------------------------ #


I admit that the example could be further improved by isolating steps that do not need to be edited (such as reading sys.argv and creating the object) from others that do. I'm happy to review improved versions of the examples.

Cheers,

Manuel.

zhenxi...@gmail.com

unread,
Dec 6, 2017, 8:56:29 PM12/6/17
to The irace package: Iterated Racing for Automatic Configuration
Dear Manuel,

Thank you for your reply. These days I tried to use irace to configurate my own problem it always output this kind of error:

+-+-----------+-----------+-----------+---------------+-----------+--------+-----+----+------+
| |   Instance|      Alive|       Best|      Mean best| Exp so far|  W time|  rho|KenW|  Qvar|
+-+-----------+-----------+-----------+---------------+-----------+--------+-----+----+------+
Error : == irace == running command ''/home/xingchi/Downloads/irace/inst/templates/tuning/target-runner-advanced.py' 1 47 671945215 /home/xingchi/Downloads/irace/inst/templates/tuning/Instances-i/data5/Jobmax_flow5.dat0  TBS23 2>&1' had status 1
== irace == The call to targetRunner was:
/home/xingchi/Downloads/irace/inst/templates/tuning/target-runner-advanced.py 1 47 671945215 /home/xingchi/Downloads/irace/inst/templates/tuning/Instances-i/data5/Jobmax_flow5.dat0  TBS23
== irace == The output was:
Traceback (most recent call last):
  File "/home/xingchi/Downloads/irace/inst/templates/tuning/target-runner-advanced.py", line 421, in <module>
    runner.run()
  File "/home/xingchi/Downloads/irace/inst/templates/tuning/target-runner-advanced.py", line 324, in run
    self.logger.error('returning cost: ' + cost)
TypeError: cannot concatenate 'str' and 'NoneType' objects
== irace == This is not a bug in irace, but means that something failed when running the command(s) above or they were terminated before completion. Try to run the command(s) above from the execution directory '/home/xingchi/Downloads/irace/inst/templates/tuning/TABU-arena' to investigate the issue.
...........


在 2017年12月6日星期三 UTC+8下午5:34:41,Manuel López-Ibáñez写道:

Manuel López-Ibáñez

unread,
Dec 12, 2017, 9:02:01 AM12/12/17
to The irace package: Iterated Racing for Automatic Configuration
Dear Zhenxi,

This happens because target-runner-advanced.py is not able to parse a number from the output of your algorithm. This may be because your algorithm is not producing the expected output (crashing, terminating with an error, not printing the cost value in the output) or because the function parse_output is not able to extract the cost value from the output of your algorithm.

It is not possible for me to tell what the problem is with the information available. If you uncomment the line

#log_level = logging.DEBUG,

it will create several debug files giving you more information. My advice is that you do that, and then run

/home/xingchi/Downloads/irace/
inst/templates/tuning/target-runner-advanced.py 1 47 671945215 /home/xingchi/Downloads/irace/inst/templates/tuning/Instances-i/data5/Jobmax_flow5.dat0  TBS23

outside irace and try to understand why that is not working (look at the files generated for anything strange or wrong, look at how you are calling your algorithm, look at the output produced by your algorithm, look at how you are extracting the cost value from the output in parse_output). The exact call to your algorithm will be in one of the debug files. Try to execute directly that call and see what happens. If your algorithm is C/C++ code, you may experience Heisenbugs that are hard to replicate. See the user-guide for how to debug those. It may be worth asking someone with some knowledge of Python to look at your parse_output function given an example of the output of your algorithm.

Once it is working, the above command should just print a single number, nothing else. Then, you may launch irace using the updated .py file.
I hope the above helps.

Manuel.

zhenxi...@gmail.com

unread,
Dec 25, 2017, 2:06:39 AM12/25/17
to The irace package: Iterated Racing for Automatic Configuration
Dear Manuel, 

I have changed the output of my algorithm,but I still got the same result. actually I knew that my algorithm could excute independently but nobody could tell me where my problems came from. I really hope to get your suggestion and thank you for your help once again.

Best Regards
Zhenxi

在 2017年12月12日星期二 UTC+8下午10:02:01,Manuel López-Ibáñez写道:

Manuel López-Ibáñez

unread,
Dec 26, 2017, 1:29:24 PM12/26/17
to The irace package: Iterated Racing for Automatic Configuration
Dear Zhenxi,

I'm sorry to say that I don't know how to help you further besides suggesting to look again at the advice above and the tips present in the User Guide. I'm happy to answer any questions that are not answered already. As the error message says, this is almost surely a bug in either your target-runner file or your own program, not in irace. If there is anything confusing in the user-guide or the errors printed by irace, please let us know and we will be happy to amend them.

irace expects a single number 'cost' (or two numbers 'cost time' when using maxTime), but your target-runner prints something else (everything that is printed after == irace == The output was). target-runner needs to be customized (or written from scratch) for your program because only you know its input/output. There are many options for writing a target-runner, including any compiled (C, C++, etc) and scripting language that can be executed in silent batch-mode (Python, Perl, R, etc), in addition to a pure R function. The other option is to modify your program to act as the target-runner (so that your program becomes the target-runner), that is, it must take command-line arguments in the format that irace passes them to the target-runner and print only a single number (this option is the simplest to debug, since there is no extra target-runner program to implement or debug). Only you can implement either of those options and debug any problems with your program.

Best wishes,

Manuel.

zhenxi...@gmail.com

unread,
Dec 26, 2017, 9:52:16 PM12/26/17
to The irace package: Iterated Racing for Automatic Configuration
Dear Manuel,

I really appreciate for your help and I will check and rewrite my target-runner for my algorithm. And I really thank you for your kindly help once again.

Best Regards,
Zhenxi

在 2017年12月27日星期三 UTC+8上午2:29:24,Manuel López-Ibáñez写道:

zhenxi...@gmail.com

unread,
Jan 11, 2018, 9:41:29 PM1/11/18
to The irace package: Iterated Racing for Automatic Configuration
Dear Manuel,

Sorry to interrrupt you once again. In my Instance folder,each instance have two files at the same time and in my algorithm they need to be inputted oderly. But in your example each instance have only one file which makes them hold their own instance_id. So I want to know whether I need to adjust my input data and make each instance only have one file.

Best Regards
Zhenxi




在 2017年12月27日星期三 UTC+8上午2:29:24,Manuel López-Ibáñez写道:
Dear Zhenxi,

Manuel López-Ibáñez

unread,
Jan 12, 2018, 6:51:31 AM1/12/18
to irace-...@googlegroups.com
On 12/01/18 02:41, zhenxi...@gmail.com wrote:
> Dear Manuel,
>
> Sorry to interrrupt you once again. In my Instance folder,each instance have
> two files at the same time and in my algorithm they need to be inputted oderly.
> But in your example each instance have only one file which makes them hold
> their own instance_id. So I want to know whether I need to adjust my input data
> and make each instance only have one file.

Dear Zhenxi,

When you only give files in Instances/ to irace, then each file must be one
single file (irace has no other way to know which files should go together).

Alternatively, you can provide a file detailing the instances
(trainInstancesFile) and, there, each line can contain the names of the two
files that form one instance, however, you will need to update either
target-runner or your target algorithm to understand how to handle those.
Please see the user guide (Section 5.4.) on how to specify trainInstancesFile
and how its contents are passed to target-runner. In short, if you have:

trainInstancesDir="./Instances"
trainInstancesFile="train-instances.txt"

and the content of train-instances.txt is:

file1a file1b
file2a file2b
file3a file3b

irace will call target-runner with something like:

target-runner 1 113 734718 ./Instances/file1a file1b --param1 0.5 ...

That is, trainInstancesDir is appended to the start of the line, not to each
word within the line, so you may need to fix this within target-runner.

Best wishes,

Manuel.

zhenxi...@gmail.com

unread,
Jan 26, 2018, 4:01:04 AM1/26/18
to The irace package: Iterated Racing for Automatic Configuration
Dear Manuel,

Thank you for your suggestion on the instance setting. I have modified the target-runner-advanced.py of ACOTSP to call my algorithm but I met some troubles. when I run the irace, the result was below:


and then the stdout file was empty, and the result of stderr was below:


I don't know how the above happend, and hope for you advice.

Best Regards,
Zhenxi




在 2018年1月12日星期五 UTC+8下午7:51:31,Manuel López-Ibáñez写道:

Manuel López-Ibáñez

unread,
Jan 28, 2018, 7:49:15 AM1/28/18
to The irace package: Iterated Racing for Automatic Configuration
The error says TABU_PA.py: permission denied. This error is from the code you wrote, not a problem in irace. Nevertheless, this situation is discussed in the irace user guide, please look for "not executable" in appendix B. As I said before, I'd suggest seeking the help of a colleague with more knowledge in Python who can help you fix the problems in your code. Doing this by email will be very slow.

zhenxi...@gmail.com

unread,
Mar 5, 2018, 8:42:52 PM3/5/18
to The irace package: Iterated Racing for Automatic Configuration
Dear Manuel,

Thank you for your help.I have successfully executed my algorithm under irace.

Best Wishes
Zhenxi

在 2018年1月28日星期日 UTC+8下午8:49:15,Manuel López-Ibáñez写道:
Reply all
Reply to author
Forward
0 new messages