Skip to content

Commit

Permalink
#5 BUGFIX: missing first word id
Browse files Browse the repository at this point in the history
  • Loading branch information
namiyousef committed Mar 6, 2022
1 parent 034c9fc commit dd9d903
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion argminer/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def __getitem__(self, index):

word_ids = inputs.word_ids()
word_id_mask = [bool(word_id) for word_id in word_ids]
word_ids = [word_id for word_id in word_ids if word_id]
word_ids = [word_id for word_id in word_ids if word_id is not None]

inputs = {
key: torch.as_tensor(val, dtype=torch.long) for key, val in inputs.items()
Expand Down

0 comments on commit dd9d903

Please sign in to comment.