feat irace add script to parse irace to csv
This commit is contained in:
parent
1b4f9447f2
commit
e617916e98
2 changed files with 20 additions and 2 deletions
|
|
@ -62,8 +62,8 @@ targetRunner = "./target-runner"
|
|||
|
||||
## Maximum number of runs (invocations of targetRunner) that will be
|
||||
## performed. It determines the maximum budget of experiments for the
|
||||
## tuning.
|
||||
maxExperiments = 100000
|
||||
## tuning. (minimum: 180)
|
||||
maxExperiments = 20000 # 100000
|
||||
|
||||
## Maximum total execution time in seconds for the executions of
|
||||
## targetRunner. targetRunner must return two values: cost and time.
|
||||
|
|
|
|||
18
eo/contrib/irace/parse_irace_bests.py
Executable file
18
eo/contrib/irace/parse_irace_bests.py
Executable file
|
|
@ -0,0 +1,18 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
import os
|
||||
import re
|
||||
import sys
|
||||
|
||||
print("pb,ecdf,crossover-rate,cross-selector,crossover,mutation-rate,mut-selector,mutation,replacement")
|
||||
for datadir in sys.argv[1:]:
|
||||
|
||||
for pb_dir in os.listdir(datadir):
|
||||
if "results_problem" in pb_dir:
|
||||
pb_id=pb_dir.replace("results_problem_","")
|
||||
with open(os.path.join("./",datadir,pb_dir,"irace.log")) as fd:
|
||||
data = [line.strip() for line in fd.readlines() if "--crossover-rate=" in line]
|
||||
for line in data:
|
||||
algo=re.sub("\-\-\S*=", ",", line)
|
||||
csv_line=pb_id+","+algo
|
||||
print(csv_line.replace(" ",""))
|
||||
Loading…
Add table
Add a link
Reference in a new issue