set CSG_TOKEN after . Upload model error in Windows PowerShell
set CSG_TOKEN=**********
use :
csghub-cli upload-large-folder goodtab/Kronos-base E:/BaiduNetdiskDownload/SD/Ai/Ai/Kronos-base error report :2025-10-01 19:36:09 - ERROR - create new model goodtab/Kronos-base on https://hub.opencsg.com response: {"code":"AUTH-ERR-1","msg":"AUTH-ERR-1: User not found, please login first"}`
@goodtab Please use following env and use latest sdk version.
export CSGHUB_TOKEN=your_access_token
https://github.com/OpenCSGs/csghub-sdk/blob/main/doc/cli.md
use export The command execution will report an error, so I used the set command
export: The term 'export' is not recognized as a name of a cmdlet, function, script file, or executable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
Run the following command: csghub-cli upload-large-folder goodtab/Kronos-base E:/BaiduNetdiskDownload/SD/Ai/Ai/Kronos-base It will report an error: `2025-10-01 19:36:09 - ERROR - create new model goodtab/Kronos-base on https://hub.opencsg.com/ response: {"code":"AUTH-ERR-1","msg":"AUTH-ERR-1: User not found, please login first"}``
Please append following info:
- csghub sdk version?
- os version?
- python version?
- Replace your_access_token with your own key get from https://opencsg.com
Please reference if you run sdk on windows:
(hubsdk) C:\Users\wangh>set CSGHUB_TOKEN=3028xxxxxxxxxxxxxxxxxxxx414eb33d1
(hubsdk) C:\Users\wangh>csghub-cli upload-large-folder wanghh2000/mod03 D:/tmp/json
2025-10-02 10:40:52 - INFO - repo model wanghh2000/mod03 created
recovering from cache metadata from D:\tmp\json/f.cache: 100%|█████████████████████████████████████| 2/2 [00:00<00:00, 285.58it/s]
2025-10-02 10:40:52 - INFO - starting 10 worker threads for upload tasks
2025-10-02 10:40:52 - INFO - init upload status, found 2 files, queue(sha): 2, queue(mode): 0, queue(preupload): 0, queue(commit): 0
computing sha256 for D:\tmp\json\2.json: 100%|█████████████████████████████████████████████████| 31.0/31.0 [00:00<00:00, 15.0kB/s]
computing sha256 for D:\tmp\json\1.txt: 100%|██████████████████████████████████████████████████| 19.0/19.0 [00:00<00:00, 3.65kB/s]
converting D:\tmp\json\2.json to base64: 100%|█████████████████████████████████████████████████| 31.0/31.0 [00:00<00:00, 23.2kB/s]
converting D:\tmp\json\1.txt to base64: 100%|██████████████████████████████████████████████████████████| 19.0/19.0 [00:00<?, ?B/s]
2025-10-02 10:40:53 - INFO - committed 2 items
2025-10-02 10:40:53 - INFO - all files have been processed! Exiting worker.
2025-10-02 10:40:53 - INFO - all files are done and exiting main loop
2025-10-02 10:40:55 - INFO - all files have been processed! Exiting worker.
2025-10-02 10:40:55 - INFO - all files have been processed! Exiting worker.
2025-10-02 10:40:55 - INFO - all files have been processed! Exiting worker.
2025-10-02 10:40:55 - INFO - all files have been processed! Exiting worker.
2025-10-02 10:40:55 - INFO - all files have been processed! Exiting worker.
2025-10-02 10:40:55 - INFO - all files have been processed! Exiting worker.
2025-10-02 10:40:55 - INFO - all files have been processed! Exiting worker.
2025-10-02 10:40:55 - INFO - all files have been processed! Exiting worker.
2025-10-02 10:40:56 - INFO - all files have been processed! Exiting worker.
---------- 2025-10-02 10:40:56 (0:00:03) ----------
Files: hashed 2/2 (50.0/50.0) | pre-uploaded: 0/0 (0.0/50.0) | queued-slices: 0 | committed: 2/2 (50.0/50.0) | ignored: 0
Workers: hashing: 0 | get upload mode: 0 | pre-uploading: 0 | slices-uploading: 0 | committing: 0 | waiting: 0
---------------------------------------------------
2025-10-02 10:40:56 - INFO - large folder upload process is complete!
goodtab
Please make sure you have already register user goodtab on opencsg.com. The error message means user name goodtab is invalid.
I have registered an account, goodtab. Here is my invitation registration link, and my Python version is Python 3.10. Is my Python version too low
Is it because my model library is private that I cannot upload it
I understand now, you need to use CMD to execute commands, PowerShell cannot execute csghub cli commands
I also hope to support PowerShell 7.5 as soon as possible
We encountered another problem, uploading the dataset but it was uploaded to the model. What is the situation?
Can you describe your steps? Or can you replicate?
@goodtab Please use -t dataset parameter in cmd.
Reference:
(sdk) wanghaihui:csghub-sdk hhwang$ csghub-cli upload-large-folder -h
Usage: csghub-cli upload-large-folder [OPTIONS] REPO_ID LOCAL_PATH
Upload large folder to OpenCSG Hub using multiple workers
╭─ Arguments ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ * repo_id TEXT The ID of the repo. (e.g. `username/repo-name`). [default: None] [required] │
│ * local_path TEXT Local path to the folder to upload. [default: None] [required] │
╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
╭─ Options ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ --repo-type -t [model|dataset|space] Specify the repository type. [default: model] │
│ --revision -r TEXT An optional Git revision id which can be a branch name [default: main] │
│ --endpoint -e TEXT The address of the request to be sent. [default: https://hub.opencsg.com] │
│ --token -k TEXT A User Access Token generated from https://opencsg.com/settings/access-token [default: None] │
│ --allow-patterns TEXT Allow patterns for files to be downloaded. [default: None] │
│ --ignore-patterns TEXT Ignore patterns for files to be downloaded. [default: None] │
│ --num-workers -n INTEGER Number of concurrent upload workers. [default: None] │
│ --print-report Whether to print a report of the upload progress. Defaults to True. │
│ --print-report-every INTEGER Frequency at which the report is printed. Defaults to 60 seconds. [default: 60] │
│ --help -h Show this message and exit. │
╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
I understand now, you need to use CMD to execute commands, PowerShell cannot execute
csghub clicommands I also hope to supportPowerShell 7.5as soon as possible
Log an issue to trace https://github.com/OpenCSGs/csghub-sdk/issues/107
Please reference https://github.com/OpenCSGs/csghub-sdk/pull/108 for how use csghub sdk on window powershell.