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

Request for Detailed Download Statistics in Hub API Endpoints #1520

Open
yachty66 opened this issue Jun 20, 2023 · 10 comments
Open

Request for Detailed Download Statistics in Hub API Endpoints #1520

yachty66 opened this issue Jun 20, 2023 · 10 comments

Comments

@yachty66
Copy link

Is your feature request related to a problem? Please describe.

I am currently working on implementing trending models for Hugging Face models (https://github.com/yachty66/trending_huggingface), similar to what is provided on GitHub's trending page (https://github.com/trending). However, I'm facing difficulties as the current Hub API Endpoints' list_models() method only provides the number of downloads from the last month. It lacks more granular, frequent statistics that would allow for real-time or at least daily tracking of model download counts.

Describe the solution you'd like

I would greatly appreciate it if the API could provide more detailed download statistics. For example, it would be extremely helpful to have data on how often a model was downloaded on a daily basis. Real-time statistics would be even better, if feasible.

Describe alternatives you've considered

As an alternative, I considered using the provided monthly download count to estimate daily downloads, but this does not provide the accuracy required for a trending models feature.

Additional context

More granular download statistics would not only benefit the implementation of trending models, but also provide useful insights for model creators and users in the Hugging Face community. It would help them to understand the adoption and usage of models more accurately and on a more frequent basis.

Thank you for considering this feature request.

@julien-c
Copy link
Member

there have been internal discussions to expose the last 7-days-downloads in addition to the last-30-days downloads

Would that work for your use case?

Beyond that we don't have current plans to expose more granular daily data. Not excluding it for the future, but not on our current roadmap

@yachty66
Copy link
Author

Thank you for your prompt response and for considering this request.

Exposing the last 7 days of download data would definitely be a step in the right direction and could be useful for the trending models feature. However, having more granular daily data would still be the ideal scenario for capturing real-time trends.

In the meantime, I'll move forward with the data available and look forward to any future enhancements you may make to data granularity. Thank you again for your engagement on this issue.

@julien-c
Copy link
Member

you're welcome, please share whatever you build here (if it's public) i would love to take a look!

@StephenHodgson
Copy link

+1 and to also add the version of the docker image/huggingface-community-inference api is also running

@yachty66
Copy link
Author

Great! My personal use case for this involves automating Twitter posts about the most trending Hugging Face model of the day. I describe my approach in this tweet. Feel free to take a look at it. The repository for tracking the most trending Hugging Face models can be found here. While it is currently missing a practical implementation, the readme provides a detailed description.

@yachty66
Copy link
Author

yachty66 commented Aug 5, 2023

I saw the new 'Trending on 🤗 This Week.' section. It's great!

@streamsunshine
Copy link

I also have a question about model statistics. Is there any api that can retrieve the 'downloadsAllTime' of a model? Thanks for any information.

@julien-c
Copy link
Member

@streamsunshine https://huggingface.co/api/models/bigscience/bloom?expand[]=downloadsAllTime

@wwwyn
Copy link

wwwyn commented Oct 1, 2023

Hi, how can we get monthly model statistics such as the number of downloads for each month of a model?

@Kosd-1
Copy link

Kosd-1 commented Jun 8, 2024

@julien-c Hello, coming back on that, is there a way to get a historical time series of monthly (or any other frequency) number of downloads of a model, apart from the "downloadsAllTime" aggegated sum?
Thank you

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

6 participants