Uploading Splits to Hugging Face #835
|
Hello! Does the hugging face integration support uploading different splits (train/validation/test)? I see that the integration enables processor outputs to get their own top-level directories on HF, but there doesn't seem to be a way to express splits. Thanks! |
Replies: 1 comment
|
Not supported today. If you need splits on the Hub, build the from datasets import load_dataset
ds = load_dataset("parquet", data_files={
"train": "train-run/parquet-files/*.parquet",
"validation": "val-run/parquet-files/*.parquet",
})
ds.push_to_hub("your-user/your-dataset")You lose the generated dataset card and the Quickest check afterwards is the Dataset Viewer on your repo page. A split dropdown above the table means the Hub picked them up. |
Not supported today.
upload_dataset()pushes the wholeparquet-files/folder in oneupload_folder()call withpath_in_repo="data"hardcoded in_upload_main_dataset_files, and nothing along that path takes a split argument. The top-level directories you spotted come from_upload_processor_files, which names them after the processor directory, so those are processor outputs rather than splits.If you need splits on the Hub, build the
DatasetDictyourself and skip the built-in uploader: