You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何正确获取Hugging Face数据集autogluon/chronos_datasets的子数据集列表

获取autogluon/chronos_datasets子数据集列表的正确方法

不需要通过触发报错来获取子数据集列表,有两种更正规的方式:

  • 使用get_dataset_config_names函数直接获取所有子数据集(配置)名称:

    from datasets import get_dataset_config_names
    
    # 获取所有子数据集名称
    dataset_configs = get_dataset_config_names("autogluon/chronos_datasets")
    print(dataset_configs)
    

    运行后会直接返回该数据集集合下所有可用的子数据集名称列表。

  • 通过数据集构建器查看配置信息:

    from datasets import load_dataset_builder
    
    builder = load_dataset_builder("autogluon/chronos_datasets")
    # 打印所有配置的名称
    for config in builder.configs:
        print(config.name)
    

    这种方式不仅能获取名称,还能查看每个子数据集的其他配置细节。

之前通过省略name参数触发报错的方法虽然能拿到列表,但属于利用错误输出的取巧方式,不推荐作为常规手段使用。

内容的提问来源于stack exchange,提问作者ivegotaquestion

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.21 08:52:32