utterworks / fast-bert

Super easy library for BERT based NLP models
Apache License 2.0
1.86k stars 341 forks source link

Updated multilabel weights to correctly inherit from dataBunch #282

Closed lingdoc closed 2 years ago

lingdoc commented 3 years ago

Fix for working with multilabel data where the weights are not correctly imported by the classifier on load, resulting in the following errors:

NameError: name 'pos_weight' is not defined
NameError: name 'weight' is not defined

addresses #267, #269 and #273 (possibly others)