-
Notifications
You must be signed in to change notification settings - Fork 374
📝 Document webhooks #554
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
📝 Document webhooks #554
Conversation
|
The documentation is not available anymore as the PR was closed or merged. |
Co-authored-by: Julien Chaumond <[email protected]>
Co-authored-by: Julien Chaumond <[email protected]>
Co-authored-by: Simon Brandeis <[email protected]>
Co-authored-by: Patrick von Platen <[email protected]>
Co-authored-by: Patrick von Platen <[email protected]>
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 <[email protected]>
|
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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. |
osanseviero
left a comment
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.
Nice!
|
|
||
| `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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if a better format for this would be a table with three columns: event.scope value, description, associated actions
docs/hub/webhooks.md
Outdated
|
|
||
| ## 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe add a link here for the activity tab
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.
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 <[email protected]>
Co-authored-by: Omar Sanseviero <[email protected]>
Co-authored-by: Omar Sanseviero <[email protected]>
julien-c
left a comment
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Made a batch of copywriting suggestions.
Co-authored-by: Victor Muštar <[email protected]>
SBrandeis
left a comment
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.
LGTM 👍
|
please review also the related #627 |
Associated PR: https://github.com/huggingface/moon-landing/pull/4477