mirror of
https://github.com/mii443/tokenizers.git
synced 2025-08-23 16:49:27 +00:00
Updating python formatting. (#1079)
* Updating python formatting. * Forgot gh action. * Skipping isort to prevent circular imports. * Updating stub. * Removing `isort` (it contradicts `stub.py`). * Fixing weird stub black/isort disagreeement.
This commit is contained in:
@ -1,8 +1,11 @@
|
||||
import multiprocessing as mp
|
||||
import os
|
||||
import requests
|
||||
|
||||
import pytest
|
||||
|
||||
import requests
|
||||
|
||||
|
||||
DATA_PATH = os.path.join("tests", "data")
|
||||
|
||||
|
||||
@ -29,33 +32,23 @@ def data_dir():
|
||||
@pytest.fixture(scope="session")
|
||||
def roberta_files(data_dir):
|
||||
return {
|
||||
"vocab": download(
|
||||
"https://s3.amazonaws.com/models.huggingface.co/bert/roberta-base-vocab.json"
|
||||
),
|
||||
"merges": download(
|
||||
"https://s3.amazonaws.com/models.huggingface.co/bert/roberta-base-merges.txt"
|
||||
),
|
||||
"vocab": download("https://s3.amazonaws.com/models.huggingface.co/bert/roberta-base-vocab.json"),
|
||||
"merges": download("https://s3.amazonaws.com/models.huggingface.co/bert/roberta-base-merges.txt"),
|
||||
}
|
||||
|
||||
|
||||
@pytest.fixture(scope="session")
|
||||
def bert_files(data_dir):
|
||||
return {
|
||||
"vocab": download(
|
||||
"https://s3.amazonaws.com/models.huggingface.co/bert/bert-base-uncased-vocab.txt"
|
||||
),
|
||||
"vocab": download("https://s3.amazonaws.com/models.huggingface.co/bert/bert-base-uncased-vocab.txt"),
|
||||
}
|
||||
|
||||
|
||||
@pytest.fixture(scope="session")
|
||||
def openai_files(data_dir):
|
||||
return {
|
||||
"vocab": download(
|
||||
"https://s3.amazonaws.com/models.huggingface.co/bert/openai-gpt-vocab.json"
|
||||
),
|
||||
"merges": download(
|
||||
"https://s3.amazonaws.com/models.huggingface.co/bert/openai-gpt-merges.txt"
|
||||
),
|
||||
"vocab": download("https://s3.amazonaws.com/models.huggingface.co/bert/openai-gpt-vocab.json"),
|
||||
"merges": download("https://s3.amazonaws.com/models.huggingface.co/bert/openai-gpt-merges.txt"),
|
||||
}
|
||||
|
||||
|
||||
@ -77,9 +70,7 @@ def train_files(data_dir):
|
||||
|
||||
@pytest.fixture(scope="session")
|
||||
def albert_base(data_dir):
|
||||
return download(
|
||||
"https://s3.amazonaws.com/models.huggingface.co/bert/albert-base-v1-tokenizer.json"
|
||||
)
|
||||
return download("https://s3.amazonaws.com/models.huggingface.co/bert/albert-base-v1-tokenizer.json")
|
||||
|
||||
|
||||
@pytest.fixture(scope="session")
|
||||
|
Reference in New Issue
Block a user