-
Notifications
You must be signed in to change notification settings - Fork 473
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
Add utility to send telemetry #1344
Conversation
The documentation is not available anymore as the PR was closed or merged. |
Codecov ReportBase: 49.56% // Head: 83.99% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #1344 +/- ##
===========================================
+ Coverage 49.56% 83.99% +34.42%
===========================================
Files 47 48 +1
Lines 4788 4791 +3
===========================================
+ Hits 2373 4024 +1651
+ Misses 2415 767 -1648
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
really nice implem!
EDIT: raised a question on Slack
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks very nice, thanks!
@Wauplin any update on when we can expect this to be merged? |
@dawoodkhan82 It's tested and reviewed so let's merge it now :) But I guess your question is more, "when will it be released"? For this question I'm not sure yet. Except if it's urgent I don't think I'll make a new release of |
@Wauplin Not urgent, but would be nice if it was released sooner. It would help with fully migrating away from segment sooner (which bills us monthly). |
@dawoodkhan82 but are you going to pin the latest huggingface_hub in gradio then? (just curious) |
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. |
Related to internal discussion related to Gradio telemetry. Idea is to centralize telemetry across HF libraries in a single helper. Gradio could be a first step (cc @abidlabs @freddyaboulton @dawoodkhan82) , but it can also replace implementation from
transformers
anddiffusers
(cc @sgugger @patrickvonplaten, even though this is not a priority).Telemetry is sent to https://huggingface.co/api/telemetry/whatever/path using a HEAD request. Headers contain a user_agent with library name/version + some stuff (hf_hub version, python version, pytorch/tf/...,). Additional data can be also provided in the user_agent, either with a string or with a dictionary. Entries are de-duplicated from the user_agent before being sent to the Hub.
Since telemetry is a bit sensible, it will be at the discretion of each library to decide when/where to put telemetry. There is always an opt-out option for the users to disable it globally with
HF_HUB_DISABLE_TELEMETRY
(orHF_HUB_OFFLINE
which has other side effects).DISABLE_TELEMETRY
is also supported as legacy fortransformers
. (We can also add helpers likedisable_telemetry
/enable_telemetry
to programmatically enable/disable it we you think it's useful).Example:
TODO:
send_telemetry
cc @julien-c @LysandreJik who brought up the topic :)