Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
mivanit committed Mar 5, 2024
1 parent 8481ccb commit b0a27b4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 3 additions & 1 deletion maze_transformer/tokenizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,9 @@ def _convert_token_to_id(self, token: str) -> int:
elif (
token == " "
): # for some reason transformers trie now returns ' ' as tokens
raise ValueError(f"Found a space token in `_convert_token_to_id`: '{token}'")
raise ValueError(
f"Found a space token in `_convert_token_to_id`: '{token}'"
)
else:
raise ValueError(f"Token not in vocab: '{token}'")

Expand Down
2 changes: 0 additions & 2 deletions tests/unit/maze_transformer/test_tokenizers.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
We may want a separate set of tests for different tokenization schemes
"""

from collections import Counter
from itertools import product

import torch
Expand Down Expand Up @@ -118,7 +117,6 @@ def test_to_ascii(tok_mode):
cfg_holder.tokenizer.to_ascii(token_ids).splitlines() == target
), "ASCII encoding from token ids failed"



@mark.parametrize(
"tok_mode",
Expand Down

0 comments on commit b0a27b4

Please sign in to comment.