-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AttributeError: type object 'PrecisionRecallDisplay' has no attribute 'from_predictions' #17
Comments
Hi @664730, |
Thanks a lot!You are right. |
File "linevul_main.py", line 526, in test |
Hi @664730 |
def line_level_localization_tp(flaw_lines: str, tokenizer, model, mini_batch, original_func: str, args, top_k_loc: list, top_k_constant: list, reasoning_method: str, index: int, write_invalid_data: bool):
Of course, it's the original one in your code. |
100%|████████████████████████████████████████████████████████████████████████████████████████████| 18864/18864 [00:25<00:00, 726.31it/s]
06/02/2024 17:05:54 - INFO - main - ***** Running Test *****
06/02/2024 17:05:54 - INFO - main - Num examples = 18864
06/02/2024 17:05:54 - INFO - main - Batch size = 128
Traceback (most recent call last):
File "linevul_main.py", line 1294, in
main()
File "linevul_main.py", line 1290, in main
test(args, model, tokenizer, test_dataset, best_threshold=0.5)
File "linevul_main.py", line 332, in test
PrecisionRecallDisplay.from_predictions(y_trues, logits[:, 1], name="LineVul")
AttributeError: type object 'PrecisionRecallDisplay' has no attribute 'from_predictions'
May I ask what to do if this error occurs? I have already updated scikit learn to 0.24.2, but it still doesn't work.
The text was updated successfully, but these errors were encountered: