From 86c88f87592e1e21c4fbf0e2353ad6e7ca302d72 Mon Sep 17 00:00:00 2001 From: Dmitrii Krasheninnikov Date: Wed, 17 Apr 2024 17:52:34 +0100 Subject: [PATCH] Upd --- data_generation/pwd_locked_composition.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data_generation/pwd_locked_composition.py b/data_generation/pwd_locked_composition.py index adbeacb..f5ba987 100644 --- a/data_generation/pwd_locked_composition.py +++ b/data_generation/pwd_locked_composition.py @@ -337,8 +337,8 @@ def evaluate_datapoint(x_in : str, if_pwd_then_fns: List[IfPwdElseFunction]): fns.append([fn for fn in if_pwd_then_fns if fn.fn_name == fn_name][0]) def accuracy(y_pred, y_true): + assert len(y_pred) == len(y_true), f'different lengths: {y_pred} vs {y_true}' return np.mean(np.array(y_pred) == np.array(y_true)) - # calculate accuracy of each function application for i, fn in enumerate(fns):