需求一:训练数据集上传

## 数据集上传 ### 使用方式 在python环境中安装.whl文件 ```bash conda activate python-env pip install ts_cli-0.0.1-py3-none-any.whl ``` ### 命令行运行.py文件的格式 ``` python-env dataset_upload.py --url {http://10.76.0.218:30800/api/v1} --source {数据集文件夹绝对路径} --name {数据集在天枢平台中显示的名称} ``` ### 示例 ![image.png](https://cos.easydoc.net/35340841/files/lhg33x8c.png) ``` D:\miniconda3\envs\dubhe\python.exe D:\vscodes\dubhe-auto-auth\dataset_upload.py --url http://10.76.0.218:30800/api/v1 --source D:\vscodes\dubhe-auto-auth\pytorch-demo\ --name 客户端数据集测试 ``` ### 数据集上传成功后结果将被覆盖写入当前目录的resfile文件中 ![image.png](https://cos.easydoc.net/35340841/files/lhg355rn.png) ++也可以指定目录,需要解压.whl文件,修改其中的dataset_util.py文件中的do_upload_file函数,重新打包为.whl文件,再重新安装.whl文件++ ```bash 解压: unzip *.whl 打包: 先进入解压工作目录,pip install wheel==0.57.0 wheel pack . ``` ### 参数的意义与指定方式 #### 参数意义 ```bash {python-env}: 客户端的python环境绝对地址 {dataset_upload.py}: 数据集上传.py文件的绝对路径 --url {$}: {天枢平台ip加端口}/api/v1 --source {$}: 数据集文件夹在windows下的绝对路径 --name {$}: 数据集将在天枢平台中显示的名称 ``` #### 指定方式 - {python-env}:读取配置文件 - {dataset_upload.py}: 读取配置文件 - url: 读取配置文件 - source: 用户自己选择的“文件夹”绝对地址 - name: 用户指定或者用文件夹名替代