DFKI-NLP / thermostat

Collection of NLP model explanations and accompanying analysis tools
Apache License 2.0
145 stars 8 forks source link

Missing assertion that num_labels in dataset corresponds to classification head shape of model #11

Open nfelnlp opened 3 years ago

nfelnlp commented 3 years ago

The alignment of the classification head with the number of labels in datasets has not been a problem so far, but I left a TODO here to insert an assert that should check if res.num_labels corresponds with the shape of the loaded model's classification head.

https://github.com/nfelnlp/thermostat/blob/b7f8e829ca2927121c7fa24eb977ecb91a92d017/src/thermostat/explain.py#L137-L138