mirror of
https://github.com/huggingface/transformers.git
synced 2025-07-31 02:02:21 +06:00
independent training / eval with local files (#10710)
* independent training / eval with local files * remove redundant assert
This commit is contained in:
parent
4c379daf64
commit
87d685b8a9
@ -242,9 +242,12 @@ def main():
|
||||
data_files = {}
|
||||
if data_args.train_file is not None:
|
||||
data_files["train"] = data_args.train_file
|
||||
extension = data_args.train_file.split(".")[-1]
|
||||
|
||||
if data_args.validation_file is not None:
|
||||
data_files["validation"] = data_args.validation_file
|
||||
extension = data_args.train_file.split(".")[-1]
|
||||
extension = data_args.validation_file.split(".")[-1]
|
||||
|
||||
datasets = load_dataset(extension, data_files=data_files, field="data")
|
||||
# See more about loading any type of standard or custom dataset (from files, python dict, pandas DataFrame, etc) at
|
||||
# https://huggingface.co/docs/datasets/loading_datasets.html.
|
||||
|
Loading…
Reference in New Issue
Block a user