Skip to content

Commit 75dc3af

Browse files
committed
Added number of finished runs per seed
1 parent f0bb0fc commit 75dc3af

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

examples/plot_solve_results.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ def load_data(
2727
all_solver = set()
2828

2929
summary = {}
30+
max_len = 0
3031

3132
for file in glob(os.path.join(output_folder, "*.csv")):
3233
filename = os.path.relpath(file, output_folder)
@@ -99,6 +100,7 @@ def load_data(
99100
summary[seed] = {}
100101
solved = sum(x[0] for x in trace)
101102
summary[seed][name] = (solved, len(trace))
103+
max_len = max(max_len, len(trace))
102104
if verbose:
103105
print(
104106
f"{name} (seed={seed}) solved",
@@ -120,7 +122,10 @@ def load_data(
120122
k.replace(solver, "").strip(" ").capitalize(): v for k, v in methods.items()
121123
}
122124
for seed in sorted(summary):
123-
print(f"{F.BLUE}seed", seed, F.RESET)
125+
finished = sum(
126+
1 for solved, total in summary[seed].values() if total == max_len
127+
)
128+
print(f"seed {F.LIGHTBLUE_EX}{seed}{F.RESET} ({finished}/{len(summary[seed])})")
124129
for name, (solved, total) in sorted(summary[seed].items()):
125130
if len(to_replace) > 0:
126131
name = name.replace(to_replace, "").strip()

0 commit comments

Comments
 (0)