[英]How to save custom dataset in local folder
我創建了一個自定義 huggingface 數據集,其中包含來自 json 行文件的圖像和地面實況數據。 我想將它保存到一個本地文件夾,並能夠通過將它加載到其他筆記本上來按原樣使用它。 我不知道這是怎么發生的。
DatasetDict({
train: Dataset({
features: ['image', 'id', 'ground_truth'],
num_rows: 7
})
test: Dataset({
features: ['image', 'id', 'ground_truth'],
num_rows: 4
})
})
根據huggingface documentacion ,您可以使用save_to_disk
,它“將數據集保存到數據集目錄或文件系統中”。
例子:
ds.save_to_disk("path/to/dataset/dir")
我在本文檔中找到了一種非常簡單的方法:
dataset.save_to_disk("path-to-dataset")
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.