Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Download folder is different between SDK and Https #56

Closed
lixjohn opened this issue Nov 4, 2024 · 4 comments
Closed

Download folder is different between SDK and Https #56

lixjohn opened this issue Nov 4, 2024 · 4 comments

Comments

@lixjohn
Copy link

lixjohn commented Nov 4, 2024

Use SDK download dataset MagicAI/BVA_Cases, SDK will creat folider like this

image

However, Https download will only create subfolder like this

image
No MagicAI parent folder, is it by deign or issue? I think SDK behavior makes more sense.

@SeanHH86
Copy link
Collaborator

SeanHH86 commented Nov 4, 2024

What api do you use in your code? file_download or http_get? Can you share your code here?

@lixjohn
Copy link
Author

lixjohn commented Nov 4, 2024

Here you go
API code.
from pycsghub.snapshot_download import snapshot_download
token = 'my token' # token from opencsg.com
endpoint = "https://hub.opencsg.com"
repo_type = "dataset"
repo_id = 'MagicAI/BVA_Cases'
cache_dir = 'my local folder' # cache dir of download data
result = snapshot_download(repo_id, cache_dir=cache_dir, endpoint=endpoint, token=token, repo_type=repo_type)

https download -
git clone https://opencsg.com/datasets/MagicAI/BVA_Cases.git

@SeanHH86
Copy link
Collaborator

SeanHH86 commented Nov 5, 2024

Yes, It is by design to create folder like / while download model by sdk. Namespace was used to group repo, and have to avoid the same repo-name in one namespace.

Command git clone just focus on one repo.

@lixjohn
Copy link
Author

lixjohn commented Nov 5, 2024

thanks for clarification, close this one.

@lixjohn lixjohn closed this as completed Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants