What is `sample_weight` used for in the `compute()` function?

Hello everyone,

I am trying to figure out how to properly evaluate predictions of a custom BertForSequenceClassification model. How is the sample_weight argument correctly used? Is it the same as the class weights that can be used in a weighted loss function?

Thank you very much in advance!

Best regards,