Skip to content

Commit 0ea9830

Browse files
Fix issue with encoder.py and Advanced Space
1 parent 904a815 commit 0ea9830

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

boudams/encoder.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -277,12 +277,12 @@ def format_confusion_matrix(self, confusion: List[List[int]]):
277277
for head, confusion_row in zip(header[1:], confusion)
278278
]
279279

280-
col_pad = header.index(self.pad_token)
280+
col_pad = header.index(self.mode.index_to_masks_name.get(self.pad_token_index))
281281
return tabulate.tabulate(
282282
[
283283
row[:col_pad] + row[col_pad+1:]
284284
for (col_id, row) in enumerate(confusion)
285-
if row[0] != self.pad_token
285+
if row[0] != "PAD"
286286
],
287-
headers=[col for col in header if col != self.pad_token]
287+
headers=[col for col in header if col != "PAD"]
288288
)

0 commit comments

Comments
 (0)