Skip to content

Commit 06b1c8d

Browse files
committed
Hopefully more compact keys for known seeds
1 parent df92705 commit 06b1c8d

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

notebooks_jason/max_of_K_all_models.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3266,7 +3266,13 @@ def do_linear_regression(X, Y):
32663266
]
32673267
print(f"len after: {len(df)}")
32683268

3269-
sorted_known_seeds = np.unique(np.array(df["seed"].values), return_counts=True)
3269+
sorted_known_seeds, sorted_known_seeds_counts = np.unique(
3270+
np.array(df["seed"].values), return_counts=True
3271+
)
3272+
sorted_known_seeds = tuple(
3273+
zip(sorted_known_seeds.tolist(), sorted_known_seeds_counts.tolist())
3274+
)
3275+
32703276
# Group by 'attention_error_handling' and calculate the max 'normalized-accuracy-bound' for sorting groups
32713277
df = df[
32723278
[
@@ -3774,6 +3780,7 @@ def do_linear_regression(X, Y):
37743780
"all_tokens_datasets_lens",
37753781
"sub_cfg_counts",
37763782
"sorted_known_seeds",
3783+
"sorted_known_seeds_counts",
37773784
):
37783785
if var in locals():
37793786
del locals()[var]

0 commit comments

Comments
 (0)