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

Add CI workflow to auto-generate api inference documentation #1480

Merged
merged 25 commits into from
Nov 18, 2024

Conversation

hanouticelina
Copy link
Contributor

This PR adds an automated workflow to update the Inference API documentation whenever there are changes in the API tasks (https://huggingface.co/api/tasks).

As this endpoint and model inference status are regularly updated, maintaining an up-to-date Inference API documentation requires to run the hub-docs/scripts/api-inference/generate script and open a PR manually. Also, as the Inference API documentation is getting more attention recently, we might expect more requests to update the documentation (example in this internal slack message). This workflow will help avoid opening PRs manually each time the documentation needs to be updated.

The initial idea was to add a cron job to run this workflow automatically on a regular basis. Would it make sense to add this automatic schedule?

Also, I'm using the same GH action as the one mentioned here (private) to create the PR. I want to have a first feedback on this before asking for repository permissions to allow the bot to create pull requests.

Note: All changes in the documentation are from running the generate scripts.

@hanouticelina hanouticelina requested a review from Wauplin November 4, 2024 11:54
@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

Copy link
Contributor

@Wauplin Wauplin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @hanouticelina, this makes perfect sense to have such a workflow!

Let's post in slack to get the GITHUB_TOKEN approval from the infra team (same as for the other 2 PRs)

@pcuenca
Copy link
Member

pcuenca commented Nov 15, 2024

Great idea!

@Wauplin
Copy link
Contributor

Wauplin commented Nov 15, 2024

Seems to (finally) work fine now! :) Learnt a few things on the pnpm side 😄
Let's wait for #1490 to be ready and merged before merging this one

@hanouticelina
Copy link
Contributor Author

@Wauplin should we add a cron job for this one?

@Wauplin
Copy link
Contributor

Wauplin commented Nov 15, 2024

Yes, added it in the last commit ^

Copy link
Contributor

@Wauplin Wauplin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#1489 looks good now, having only the @huggingface/tasks update makes sense IMO.

Time to merge I think once the workflow trigger is reverted to a cron job :)

@hanouticelina
Copy link
Contributor Author

thanks @Wauplin for the review! I reverted the workflow trigger to a cron job and I updated the PR body to specify that it also upgrades @huggingface/tasks. Let's merge :)

@hanouticelina hanouticelina merged commit 00462a5 into main Nov 18, 2024
1 check passed
@hanouticelina hanouticelina deleted the regenerate-api-inference-docs branch November 18, 2024 14:36
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.

4 participants