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

Send a request to config.json when downloading model from HF repository #31

Merged
merged 4 commits into from
Nov 22, 2024

Conversation

chmjkb
Copy link
Contributor

@chmjkb chmjkb commented Nov 20, 2024

Description

Currently, the HuggingFace download count is not incremented when downloading models. HF counts the model downloads by counting the requests sent to the config.json file in the repository root (a HEAD request is enough). This PR sends a HEAD request to the config json, when the model source is our organization.
source: https://huggingface.co/docs/hub/models-download-stats

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update (improves or adds clarity to existing documentation)

Tested on

  • iOS
  • Android

Testing instructions

Screenshots

Related issues

Checklist

  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have updated the documentation accordingly
  • My changes generate no new warnings

Additional notes

@chmjkb chmjkb requested a review from mkopcins November 20, 2024 10:17
@chmjkb chmjkb merged commit fe00d6b into main Nov 22, 2024
2 checks passed
@chmjkb chmjkb deleted the add-hf-config-download branch November 22, 2024 14:14
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

Successfully merging this pull request may close these issues.

2 participants