From 4ab2a73088cd620d73bccea575de4dfcf565e0c4 Mon Sep 17 00:00:00 2001 From: Jason Gross Date: Wed, 6 Nov 2024 13:07:04 -0800 Subject: [PATCH] Fix key error bug --- notebooks_jason/max_of_K_all_models.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/notebooks_jason/max_of_K_all_models.py b/notebooks_jason/max_of_K_all_models.py index 5e1cda91..67ef56f5 100644 --- a/notebooks_jason/max_of_K_all_models.py +++ b/notebooks_jason/max_of_K_all_models.py @@ -3266,6 +3266,7 @@ def do_linear_regression(X, Y): ] print(f"len after: {len(df)}") + sorted_known_seeds = tuple(sorted(df["seed"].values)) # Group by 'attention_error_handling' and calculate the max 'normalized-accuracy-bound' for sorting groups df = df[ [ @@ -3329,7 +3330,7 @@ def do_linear_regression(X, Y): sing_upper_bound, attn_err_handling_key, best_bound_only, - tuple(sorted(subgroup["seed"].values)), + sorted_known_seeds, ) attn_err_handling_key_latex = (