Skip to content

Commit

Permalink
plotting fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
tomsilver committed Jun 6, 2022
1 parent c457723 commit 66e9ba1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions scripts/plotting/create_timing_option_learning_plots.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,13 +105,14 @@ def _load_results_for_seed(df: pd.DataFrame, selector: Callable[[pd.DataFrame],
if np.isnan(result):
continue # timeout
all_time_results.append(result)
assert len(all_time_results) > 0
if not all_time_results:
return [0, TIMEOUT], [0, 0]
seed_xs = [0] + sorted(all_time_results)
seed_ys = list(range(len(seed_xs)))
assert seed_xs[-1] < TIMEOUT
seed_xs.append(TIMEOUT)
seed_ys.append(seed_ys[-1])
seed_ys = np.array(seed_ys) / len(TASK_IDS) # convert to percent solved
seed_ys = 100 * np.array(seed_ys) / len(TASK_IDS) # convert to percent solved
return seed_xs, seed_ys


Expand Down

0 comments on commit 66e9ba1

Please sign in to comment.