johnmai-dev / HuggingfaceHub

🚧[WIP] The Swift client for the Huggingface Hub.
MIT License
1 stars 0 forks source link

General direction of this project #1

Open DePasqualeOrg opened 1 week ago

DePasqualeOrg commented 1 week ago

Thanks for creating this project, @johnmai-dev! I'm not familiar with how the Python library works, but from the perspective of users of iOS/macOS/visionOS apps that download models from Hugging Face, I think some of the most important features (which users of my own app have frequently requested) would be the following:

I'm not sure whether these would fall under the scope of this project, or if app developers would be expected to implement them themselves. What do you think?

Also, while the models directory on macOS seems clear, what should the location on iOS be? I think iOS apps only have access to the app's container (and app group's container, if this capability is enabled).

johnmai-dev commented 1 week ago

Thanks for creating this project, @johnmai-dev! I'm not familiar with how the Python library works, but from the perspective of users of iOS/macOS/visionOS apps that download models from Hugging Face, I think some of the most important features (which users of my own app have frequently requested) would be the following:

  • Pause and cancel downloads
  • Resume partial downloads
  • Queue downloads

I'm not sure whether these would fall under the scope of this project, or if app developers would be expected to implement them themselves. What do you think?

Also, while the models directory on macOS seems clear, what should the location on iOS be? I think iOS apps only have access to the app's container (and app group's container, if this capability is enabled).

Yes, Pause and cancel, Resume partial downloads are within the scope of this project, but I still need to think about Queue; I originally intended for Queue to be implemented by users. The iOS directory is currently the same as swift-transformers. I'm not sure if the group's container is allowed.

https://github.com/huggingface/swift-transformers/blob/d42fdae473c49ea216671da8caae58e102d28709/Sources/Hub/HubApi.swift#L25

https://github.com/johnmai-dev/HuggingfaceHub/blob/fdb6e0218f874993ccb1525994452f48255fb6de/Sources/HuggingfaceHub/CacheManager/CacheManager.swift#L18-L26