Datasets 文件

命令列介面 (CLI)

Hugging Face's logo
加入 Hugging Face 社群

並獲得增強的文件體驗

開始使用

命令列介面 (CLI)

🤗 Datasets 提供了一個命令列介面 (CLI),其中包含有用的 shell 命令,可用於與你的資料集進行互動。

你可以檢查可用命令

>>> datasets-cli --help
usage: datasets-cli <command> [<args>]

positional arguments:
  {env,test,delete_from_hub}
                        datasets-cli command helpers
    env                 Print relevant system environment info.
    test                Test dataset loading.
    delete_from_hub     Delete dataset config from the Hub

optional arguments:
  -h, --help            show this help message and exit

從 Hub 刪除

從 Hub 上的受支援的資料集中刪除資料集配置。

>>> datasets-cli delete_from_hub --help
usage: datasets-cli <command> [<args>] delete_from_hub [-h] [--token TOKEN] [--revision REVISION] dataset_id config_name

positional arguments:
  dataset_id           source dataset ID, e.g. USERNAME/DATASET_NAME or ORGANIZATION/DATASET_NAME
  config_name          config name to delete

optional arguments:
  -h, --help           show this help message and exit
  --token TOKEN        access token to the Hugging Face Hub
  --revision REVISION  source revision

例如:

>>> datasets-cli delete_from_hub USERNAME/DATASET_NAME CONFIG_NAME

別忘了你需要先登入到你的 Hugging Face 賬戶

>>> huggingface-cli login
< > 在 GitHub 上更新

© . This site is unofficial and not affiliated with Hugging Face, Inc.