添加数据集 =========== .. contents:: 本节目录 :depth: 2 命令: ``dataset`` 数据集添加分类两类,本地和远程,用 ``--help`` 命令可看到有以下子命令 ``local`` ``remote`` : .. code-block:: shell anyctl add dataset --help .. code-block:: shell Usage: anyctl add dataset [OPTIONS] COMMAND [ARGS]... Add local or remote dataset to local Anylearn project. Options: --help Show this message and exit. Commands: local Add local algorithm to current project. remote Add remote dataset by ID to current project. 添加本地数据集 --------------- 命令: ``local`` +---------------------------+----------+-------------+---------------------------------------------------------+ | 参数及缩写 | 是否必须 | 默认值 | 说明 | +===========================+==========+=============+=========================================================+ | name | True | | 数据集名称 | +---------------------------+----------+-------------+---------------------------------------------------------+ | -\-dir | True | | 本地数据集文件夹(绝对路径) | +---------------------------+----------+-------------+---------------------------------------------------------+ 使用示例: .. code-block:: shell anyctl add dataset local anyctl_dset --dir D:\anyctl-test\resource\fashion_mnist 运行后会有以下输出: .. code-block:: shell [SUCCESS] ADDED #提示数据集添加成功 此时我们用 ``anyctl config ls`` 查看配置项可以看到数据集信息已经有了: .. code-block:: shell ... #只截取新添加的 dataset 部分 datasets: anyctl_dset: id: name: anyctl_dset description: visibility: 3 path: algorithm: anyctl_algo: D:\anyctl-test\resource\cnn cli_example_algo: dataset: anyctl_dset: D:\anyctl-test\resource\fashion_mnist 添加远程数据集 --------------- 我们除了添加本地数据集以外还可以添加已经上传到后端的数据集,只需要知道后端数据集ID即可。 命令: ``remote`` +---------------------------+----------+-------------+---------------------------------------------------------+ | 参数及缩写 | 是否必须 | 默认值 | 说明 | +===========================+==========+=============+=========================================================+ | id | True | | 远程数据集ID | +---------------------------+----------+-------------+---------------------------------------------------------+ 使用示例: .. code-block:: shell anyctl add dataset remote DSETxxx 如果需要配置远程地址和用户信息请参考 :ref:`set_host_user_info` 。 运行后会有以下输出: .. code-block:: shell [SUCCESS] ADDED #提示数据集添加成功 此时我们用 ``anyctl config ls`` 查看配置项可以看到远程数据集信息已经有了: .. code-block:: shell ... datasets: anyctl_dset: id: name: anyctl_dset description: visibility: 3 testctldset: #新添加的远程数据集信息 id: DSETxxx name: testctldset description: SDK_QUICKSTART visibility: 1 path: algorithm: anyctl_algo: D:\anyctl-test\resource\cnn cli_example_algo: dataset: anyctl_dset: D:\anyctl-test\resource\fashion_mnist testctldset: