mirror of
https://github.com/huggingface/transformers.git
synced 2025-07-03 12:50:06 +06:00
Fix: Fixed directory path for utils folder in test_tokenization_utils.py
(#32601)
* Removed un-necessary expressions. * Fixed directory path for utils folder in test_tokenization_utils.py
This commit is contained in:
parent
cc25757a44
commit
c3cd9d807e
@ -94,7 +94,6 @@ def main():
|
||||
|
||||
short_validation_dataset = dataset.filter(lambda x: (len(x["question"]) + len(x["context"])) < 4 * 4096)
|
||||
short_validation_dataset = short_validation_dataset.filter(lambda x: x["category"] != "null")
|
||||
short_validation_dataset
|
||||
|
||||
model_id = "vasudevgupta/flax-bigbird-natural-questions"
|
||||
model = FlaxBigBirdForNaturalQuestions.from_pretrained(model_id)
|
||||
|
@ -36,7 +36,7 @@ from transformers.testing_utils import TOKEN, USER, is_staging_test, require_tok
|
||||
from transformers.tokenization_utils import ExtensionsTrie, Trie
|
||||
|
||||
|
||||
sys.path.append(str(Path(__file__).parent.parent / "utils"))
|
||||
sys.path.append(str(Path(__file__).parent.parent.parent / "utils"))
|
||||
|
||||
from test_module.custom_tokenization import CustomTokenizer # noqa E402
|
||||
|
||||
@ -253,7 +253,6 @@ class TrieTest(unittest.TestCase):
|
||||
trie.add("Hello 友達")
|
||||
self.assertEqual(trie.data, {"H": {"e": {"l": {"l": {"o": {" ": {"友": {"達": {"": 1}}}}}}}}})
|
||||
trie.add("Hello")
|
||||
trie.data
|
||||
self.assertEqual(trie.data, {"H": {"e": {"l": {"l": {"o": {"": 1, " ": {"友": {"達": {"": 1}}}}}}}}})
|
||||
|
||||
def test_trie_split(self):
|
||||
|
Loading…
Reference in New Issue
Block a user