Skip to content

Commit 42a3b2a

Browse files
authored
Update upload commands in README (#105)
- Added upload-large-folder command - Reordered upload examples - Clarified upload limitations in notes
1 parent 758bdeb commit 42a3b2a

File tree

2 files changed

+39
-34
lines changed

2 files changed

+39
-34
lines changed

README.md

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -103,20 +103,8 @@ csghub-cli download OpenCSG/GitLab-DataSets-V1 -t dataset
103103
# download space
104104
csghub-cli download OpenCSG/csg-wukong-1B -t space
105105

106-
# upload a single file to folder1
107-
csghub-cli upload wanghh2000/myprivate1 abc/3.txt folder1
108-
109-
# upload local folder '/Users/hhwang/temp/jsonl' to root path of repo 'wanghh2000/m01' with default branch
110-
csghub-cli upload wanghh2000/m01 /Users/hhwang/temp/jsonl
111-
112-
# upload local folder '/Users/hhwang/temp/jsonl' to root path of repo 'wanghh2000/m04' with token 'xxxxxx' and v2 branch
113-
csghub-cli upload wanghh2000/m04 /Users/hhwang/temp/jsonl -k xxxxxx --revision v2
114-
115-
# upload local folder '/Users/hhwang/temp/jsonl' to path 'test/files' of repo 'wanghh2000/m01' with branch v1
116-
csghub-cli upload wanghh2000/m01 /Users/hhwang/temp/jsonl test/files --revision v1
117-
118-
# upload local folder '/Users/hhwang/temp/jsonl' to path 'test/files' of repo 'wanghh2000/m01' with token 'xxxxxx'
119-
csghub-cli upload wanghh2000/m01 /Users/hhwang/temp/jsonl test/files -k xxxxxx
106+
# upload local large folder '/Users/hhwang/temp/abc' to model repo 'wanghh2000/model05'
107+
csghub-cli upload-large-folder wanghh2000/model05 /Users/hhwang/temp/abc
120108

121109
# list inference instances for user 'wanghh2000'
122110
csghub-cli inference list -u wanghh2000
@@ -136,11 +124,25 @@ csghub-cli finetune start OpenCSG/csg-wukong-1B 326
136124
# stop fine-tuning instance for model repo 'OpenCSG/csg-wukong-1B' with ID '326'
137125
csghub-cli finetune stop OpenCSG/csg-wukong-1B 326
138126

139-
# upload local large folder '/Users/hhwang/temp/abc' to model repo 'wanghh2000/model05'
140-
csghub-cli upload-large-folder wanghh2000/model05 /Users/hhwang/temp/abc
127+
# upload a single file to folder1
128+
csghub-cli upload wanghh2000/myprivate1 abc/3.txt folder1
129+
130+
# upload local folder '/Users/hhwang/temp/jsonl' to root path of repo 'wanghh2000/m01' with default branch
131+
csghub-cli upload wanghh2000/m01 /Users/hhwang/temp/jsonl
132+
133+
# upload local folder '/Users/hhwang/temp/jsonl' to root path of repo 'wanghh2000/m04' with token 'xxxxxx' and v2 branch
134+
csghub-cli upload wanghh2000/m04 /Users/hhwang/temp/jsonl -k xxxxxx --revision v2
135+
136+
# upload local folder '/Users/hhwang/temp/jsonl' to path 'test/files' of repo 'wanghh2000/m01' with branch v1
137+
csghub-cli upload wanghh2000/m01 /Users/hhwang/temp/jsonl test/files --revision v1
138+
139+
# upload local folder '/Users/hhwang/temp/jsonl' to path 'test/files' of repo 'wanghh2000/m01' with token 'xxxxxx'
140+
csghub-cli upload wanghh2000/m01 /Users/hhwang/temp/jsonl test/files -k xxxxxx
141141
```
142142

143-
Notes: `csghub-cli upload` will create repo and its branch if they do not exist. The default branch is `main`. If you want to upload to a specific branch, you can use the `--revision` option. If the branch does not exist, it will be created. If the branch already exists, the files will be uploaded to that branch.
143+
Notes:
144+
- `csghub-cli upload` will create repo and its branch if they do not exist. The default branch is `main`. If you want to upload to a specific branch, you can use the `--revision` option. If the branch does not exist, it will be created. If the branch already exists, the files will be uploaded to that branch.
145+
- `csghub-cli upload` has a limitation of the file size to 4GB. If you need to upload larger files, you can use the `csghub-cli upload-large-folder` command.
144146

145147
When using the `upload-large-folder` command to upload a folder, the upload progress will be recorded in the `.cache` folder within the upload directory to support resumable uploads. Do not delete the `.cache` folder before the upload is complete.
146148

README_cn.md

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -102,20 +102,8 @@ csghub-cli download OpenCSG/chinese-fineweb-edu-v2 -t dataset
102102
# 应用下载
103103
csghub-cli download OpenCSG/csg-wukong-1B -t space
104104

105-
# 上传单个文件到仓库目录folder1
106-
csghub-cli upload wanghh2000/myprivate1 abc/3.txt folder1
107-
108-
# 上传本地目录'/Users/hhwang/temp/jsonl'到仓库'wanghh2000/m01'的默认分支根目录下
109-
csghub-cli upload wanghh2000/m01 /Users/hhwang/temp/jsonl
110-
111-
# 上传本地目录'/Users/hhwang/temp/jsonl' 到仓库'wanghh2000/m04'的v2分支根目录下使用token'xxxxxx'
112-
csghub-cli upload wanghh2000/m04 /Users/hhwang/temp/jsonl -k xxxxxx --revision v2
113-
114-
# 上传本地目录'/Users/hhwang/temp/jsonl'到仓库'wanghh2000/m01'的v1分支的'test/files'目录下
115-
csghub-cli upload wanghh2000/m01 /Users/hhwang/temp/jsonl test/files --revision v1
116-
117-
# 上传本地目录'/Users/hhwang/temp/jsonl'到仓库'wanghh2000/m01'的默认分支'test/files'目录下并使用指定token
118-
csghub-cli upload wanghh2000/m01 /Users/hhwang/temp/jsonl test/files -k xxxxxx
105+
# 上传本地目录/Users/hhwang/temp/abc中的所有文件到远程仓库wanghh2000/model05
106+
csghub-cli upload-large-folder wanghh2000/model05 /Users/hhwang/temp/abc
119107

120108
# 列出用户wanghh2000的推理实例
121109
csghub-cli inference list -u wanghh2000
@@ -135,11 +123,26 @@ csghub-cli finetune start OpenCSG/csg-wukong-1B 326
135123
# 停止ID为326使用模型OpenCSG/csg-wukong-1B的微调实例
136124
csghub-cli finetune stop OpenCSG/csg-wukong-1B 326
137125

138-
# 上传本地目录/Users/hhwang/temp/abc中的所有文件到远程仓库wanghh2000/model05
139-
csghub-cli upload-large-folder wanghh2000/model05 /Users/hhwang/temp/abc
126+
# 上传单个文件到仓库目录folder1
127+
csghub-cli upload wanghh2000/myprivate1 abc/3.txt folder1
128+
129+
# 上传本地目录'/Users/hhwang/temp/jsonl'到仓库'wanghh2000/m01'的默认分支根目录下
130+
csghub-cli upload wanghh2000/m01 /Users/hhwang/temp/jsonl
131+
132+
# 上传本地目录'/Users/hhwang/temp/jsonl' 到仓库'wanghh2000/m04'的v2分支根目录下使用token'xxxxxx'
133+
csghub-cli upload wanghh2000/m04 /Users/hhwang/temp/jsonl -k xxxxxx --revision v2
134+
135+
# 上传本地目录'/Users/hhwang/temp/jsonl'到仓库'wanghh2000/m01'的v1分支的'test/files'目录下
136+
csghub-cli upload wanghh2000/m01 /Users/hhwang/temp/jsonl test/files --revision v1
137+
138+
# 上传本地目录'/Users/hhwang/temp/jsonl'到仓库'wanghh2000/m01'的默认分支'test/files'目录下并使用指定token
139+
csghub-cli upload wanghh2000/m01 /Users/hhwang/temp/jsonl test/files -k xxxxxx
140+
140141
```
141142

142-
注意:csghub-cli upload 将在仓库和分支不存在时创建它们。默认分支为main。如果您想上传到特定分支,可以使用 --revision 选项。如果该分支不存在,将会被创建。如果分支已存在,文件将上传到该分支。
143+
注意:
144+
- `csghub-cli upload` 将在仓库和分支不存在时创建它们。默认分支为main。如果您想上传到特定分支,可以使用 --revision 选项。如果该分支不存在,将会被创建。如果分支已存在,文件将上传到该分支。
145+
- `csghub-cli upload` 限制文件大小为4GB。如果您需要上传更大的文件,可以使用`csghub-cli upload-large-folder` 命令.
143146

144147
当使用`upload-large-folder`命令上传文件夹时,上传进度会在记录在上传目录`.cache`文件夹中用于支持断点续传,在上传完成前勿删除`.cache`文件夹。
145148

0 commit comments

Comments
 (0)