course
course copied to clipboard
Bug in chapter 7, section 2: return parameters are swapped
In the line below, the function postprocess returns first the labels and then the predictions.
https://github.com/huggingface/course/blob/198345755d4e2b1e61a394c6df03c36319258fda/chapters/en/chapter7/2.mdx#L877
However, when this function is called, the first variable instead catches the predictions and the second catches the labels.
https://github.com/huggingface/course/blob/198345755d4e2b1e61a394c6df03c36319258fda/chapters/en/chapter7/2.mdx#L923
This results in an incorrect calculation for the precision, recall and f1 for the provided dataset. People copying this example will also unknowingly copy this bug into their code.