mirror of
https://github.com/ml-explore/mlx-examples.git
synced 2025-09-06 17:04:34 +08:00
fix pre-commit lint
This commit is contained in:
@@ -107,7 +107,7 @@ def load_local_dataset(data_path: Path, tokenizer: PreTrainedTokenizer):
|
|||||||
|
|
||||||
|
|
||||||
def load_hf_dataset(data_id: str, tokenizer: PreTrainedTokenizer):
|
def load_hf_dataset(data_id: str, tokenizer: PreTrainedTokenizer):
|
||||||
from datasets import load_dataset, exceptions
|
from datasets import exceptions, load_dataset
|
||||||
|
|
||||||
try:
|
try:
|
||||||
dataset = load_dataset(data_id)
|
dataset = load_dataset(data_id)
|
||||||
@@ -120,9 +120,7 @@ def load_hf_dataset(data_id: str, tokenizer: PreTrainedTokenizer):
|
|||||||
]
|
]
|
||||||
|
|
||||||
except exceptions.DatasetNotFoundError:
|
except exceptions.DatasetNotFoundError:
|
||||||
raise ValueError(
|
raise ValueError(f"Not found Hugging Face dataset: {data_id} .")
|
||||||
f"Not found Hugging Face dataset: {data_id} ."
|
|
||||||
)
|
|
||||||
|
|
||||||
return train, valid, test
|
return train, valid, test
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user