📝 Document webhooks#554
Conversation
|
The documentation is not available anymore as the PR was closed or merged. |
Co-authored-by: Julien Chaumond <julien@huggingface.co>
Co-authored-by: Julien Chaumond <julien@huggingface.co>
Co-authored-by: Simon Brandeis <33657802+SBrandeis@users.noreply.github.com>
Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com>
Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com>
There was a problem hiding this comment.
Take my feedback with a grain of salt. My front-end / networks knowledge is quite limited and I spent 0 time on googling any of the words / definitions.
For me a full-on walk-through of:
- Set up a webhook
- An example of how this webhook is triggered
Possible with some screenshots in-between would be super useful
sanchit-gandhi
left a comment
There was a problem hiding this comment.
Also not sure if I fall under your target audience! But if I do, I'd reiterate what Patrick has suggested and try and make the doc a bit more 'interactive' (either more examples or a full walkthrough)
The examples you've listed for Repo, Discussion and Comment are useful - they were the bits that were most clear for me. Until that point, it's a bit abstract and harder to understand from an ML practitioner point of view.
Co-authored-by: Julien Chaumond <julien@huggingface.co>
|
Overall I think it's a good document (and agree with all the comments still open). What I think could take this the extra mile would be to do a tutorial of a full fledge hook. Like let's say I need to update my API when the model is modified ? |
And the hook could be hosted on a space! I have something similar planned but it's not ML related (deploying a website on code changes), I think something ML-related would be better. |
|
my thinking is that we can first do a "private beta" shipping of this (maybe using a hardcoded org like |
not PRO users? x) |
|
Thank you @patrickvonplaten @xianbaoqian @sanchit-gandhi for your suggestions! I rewrote the docs taking into account your comments and adding a few screenshots, it's previewable at https://moon-ci-docs.huggingface.co/docs/hub/pr_554/en/webhooks. I also added a full payload as an example, and changed |
philschmid
left a comment
There was a problem hiding this comment.
Looks amazing. 😍 This will allow us to build many cool features next year and examples for real MLOps automation.
Two question from my side are:
- Will the API be public to create webhooks? and will it then be integrated into
huggingface_hub? - Is there a way to identify the webhook request to a hub user programmatically?, e.g.
whoisthis?secret=SECRET. => returns the userId
-> This would allow us to add a "route" to the endpoints (UI),/webhooksto automatically rollout deployments.
Haha cc @Wauplin See comment on original PR: https://github.com/huggingface/moon-landing/pull/4477#discussion_r1048361481 Opened an issue: https://github.com/huggingface/moon-landing/issues/4888. It'll be easy to make it public once it's live.
We can add Also created https://github.com/huggingface/moon-landing/issues/4889 |
Thanks for the ping. Actually yes it could be but not the priority for now. |
|
|
||
| `event.scope` can take one of the following values: | ||
|
|
||
| - `"repo"` - Global events on repos. Possible values for the associated `action`: `"create"`, `"delete"`, `"update"`, `"move"`. |
There was a problem hiding this comment.
I wonder if a better format for this would be a table with three columns: event.scope value, description, associated actions
|
|
||
| ## Rate limiting | ||
|
|
||
| Each webhook is limited to 1,000 triggers per 24 hours. You can check the daily triggers for your webhook in your webhook settings, in the "Activity" tab. |
There was a problem hiding this comment.
Maybe add a link here for the activity tab
There was a problem hiding this comment.
not possible - the activity tab is hf.co/settings/webhooks/xxxx/activity , it depends on the individual webhook's id
Co-authored-by: Omar Sanseviero <osanseviero@gmail.com>
Co-authored-by: Omar Sanseviero <osanseviero@gmail.com>
Co-authored-by: Omar Sanseviero <osanseviero@gmail.com>
julien-c
left a comment
There was a problem hiding this comment.
BTW did you see there's an existing api-webhook page
https://huggingface.co/docs/hub/api-webhook
Might make sense to redirect that old one to the new one
Slightly more concerning, that no-one ever contacted us to get access to the webhook hahaha 😹
gary149
left a comment
There was a problem hiding this comment.
Made a batch of copywriting suggestions.
Co-authored-by: Victor Muštar <victor.mustar@gmail.com>
|
please review also the related #627 |
Associated PR: https://github.com/huggingface/moon-landing/pull/4477