knowledge-unlearning icon indicating copy to clipboard operation
knowledge-unlearning copied to clipboard

accuracy missing "task" argument

Open venkatadithya9 opened this issue 2 years ago • 1 comments

In the validation_forget() function, accuracy has been used without specifying the task argument which throws an AssertionError.

acc = accuracy(pred, label, ignore_index=-100)

I have replaced it with

acc = accuracy(pred, label, task="multiclass", num_classes=5063, ignore_index=-100)

I found 5063 to be the number of unique labels. Is this the right fix?

venkatadithya9 avatar Jan 23 '23 07:01 venkatadithya9

Hi, @venkatadithya9 . It seems like torchmetrics updated their API to must include the task argument. We recommend you use version 0.10.3 or lower, which uses the previous API.

Sorry for the confusion.

MattYoon avatar Feb 06 '23 07:02 MattYoon