From 32efb54beb4836ed6b8b6aef698d9c069e6bcadb Mon Sep 17 00:00:00 2001 From: Julien Chaumond Date: Tue, 1 Apr 2025 13:36:54 +0200 Subject: [PATCH 1/6] selective rename --- .../api_inference_build_documentation.yml | 6 +++--- .../api_inference_build_pr_documentation.yml | 6 +++--- .../api_inference_generate_documentation.yml | 14 +++++++------- .../api_inference_upload_pr_documentation.yml | 2 +- docs/api-inference/tasks/audio-classification.md | 4 ++-- .../tasks/automatic-speech-recognition.md | 4 ++-- docs/api-inference/tasks/chat-completion.md | 6 +++--- docs/api-inference/tasks/feature-extraction.md | 4 ++-- docs/api-inference/tasks/fill-mask.md | 4 ++-- docs/api-inference/tasks/image-classification.md | 4 ++-- docs/api-inference/tasks/image-segmentation.md | 4 ++-- docs/api-inference/tasks/image-to-image.md | 4 ++-- docs/api-inference/tasks/object-detection.md | 4 ++-- docs/api-inference/tasks/question-answering.md | 4 ++-- docs/api-inference/tasks/summarization.md | 4 ++-- .../tasks/table-question-answering.md | 4 ++-- docs/api-inference/tasks/text-classification.md | 4 ++-- docs/api-inference/tasks/text-generation.md | 4 ++-- docs/api-inference/tasks/text-to-image.md | 4 ++-- docs/api-inference/tasks/token-classification.md | 4 ++-- docs/api-inference/tasks/translation.md | 4 ++-- .../tasks/zero-shot-classification.md | 4 ++-- docs/hub/billing.md | 2 +- docs/hub/models-inference.md | 2 +- docs/hub/models-widgets.md | 2 +- docs/hub/oauth.md | 2 +- docs/hub/spaces-oauth.md | 2 +- docs/hub/spaces-sdks-docker-langfuse.md | 2 +- scripts/api-inference/scripts/generate.ts | 2 +- .../templates/common/page-header.handlebars | 4 ++-- .../templates/task/chat-completion.handlebars | 2 +- .../templates/task/image-text-to-text.handlebars | 2 +- 32 files changed, 62 insertions(+), 62 deletions(-) diff --git a/.github/workflows/api_inference_build_documentation.yml b/.github/workflows/api_inference_build_documentation.yml index 903d8b96e..da805071a 100644 --- a/.github/workflows/api_inference_build_documentation.yml +++ b/.github/workflows/api_inference_build_documentation.yml @@ -3,7 +3,7 @@ name: Build Inference API documentation on: push: paths: - - "docs/api-inference/**" + - "docs/inference-providers/**" branches: - main @@ -13,8 +13,8 @@ jobs: with: commit_sha: ${{ github.sha }} package: hub-docs - package_name: api-inference - path_to_docs: hub-docs/docs/api-inference/ + package_name: inference-providers + path_to_docs: hub-docs/docs/inference-providers/ additional_args: --not_python_module secrets: hf_token: ${{ secrets.HF_DOC_BUILD_PUSH }} diff --git a/.github/workflows/api_inference_build_pr_documentation.yml b/.github/workflows/api_inference_build_pr_documentation.yml index 632dd68c7..5073baad4 100644 --- a/.github/workflows/api_inference_build_pr_documentation.yml +++ b/.github/workflows/api_inference_build_pr_documentation.yml @@ -3,7 +3,7 @@ name: Build Inference API PR Documentation on: pull_request: paths: - - "docs/api-inference/**" + - "docs/inference-providers/**" concurrency: group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} @@ -16,6 +16,6 @@ jobs: commit_sha: ${{ github.event.pull_request.head.sha }} pr_number: ${{ github.event.number }} package: hub-docs - package_name: api-inference - path_to_docs: hub-docs/docs/api-inference/ + package_name: inference-providers + path_to_docs: hub-docs/docs/inference-providers/ additional_args: --not_python_module diff --git a/.github/workflows/api_inference_generate_documentation.yml b/.github/workflows/api_inference_generate_documentation.yml index 9be09b4eb..0ac167453 100644 --- a/.github/workflows/api_inference_generate_documentation.yml +++ b/.github/workflows/api_inference_generate_documentation.yml @@ -23,23 +23,23 @@ jobs: with: run_install: | - recursive: true - cwd: ./scripts/api-inference + cwd: ./scripts/inference-providers args: [--frozen-lockfile] - package_json_file: ./scripts/api-inference/package.json + package_json_file: ./scripts/inference-providers/package.json - name: Update huggingface/tasks package - working-directory: ./scripts/api-inference + working-directory: ./scripts/inference-providers run: | pnpm update @huggingface/tasks@latest # Generate - name: Generate API inference documentation run: pnpm run generate - working-directory: ./scripts/api-inference + working-directory: ./scripts/inference-providers # Check changes - name: Check changes run: | git diff --name-only > changed_files.txt - if grep -v -E "^(scripts/api-inference/package.json|scripts/api-inference/pnpm-lock.yaml)$" changed_files.txt | grep -q '.'; then + if grep -v -E "^(scripts/inference-providers/package.json|scripts/inference-providers/pnpm-lock.yaml)$" changed_files.txt | grep -q '.'; then echo "changes_detected=true" >> $GITHUB_ENV else echo "changes_detected=false" >> $GITHUB_ENV @@ -58,13 +58,13 @@ jobs: with: token: ${{ secrets.TOKEN_INFERENCE_SYNC_BOT }} commit-message: Update API inference documentation (automated) - branch: update-api-inference-docs-automated-pr + branch: update-inference-providers-docs-automated-pr delete-branch: true title: "[Bot] Update API inference documentation" body: | This PR automatically upgrades the `@huggingface/tasks` package and regenerates the API inference documentation by running: ```sh - cd scripts/api-inference + cd scripts/inference-providers pnpm update @huggingface/tasks@latest pnpm run generate ``` diff --git a/.github/workflows/api_inference_upload_pr_documentation.yml b/.github/workflows/api_inference_upload_pr_documentation.yml index c2c2ab4e0..5df163466 100644 --- a/.github/workflows/api_inference_upload_pr_documentation.yml +++ b/.github/workflows/api_inference_upload_pr_documentation.yml @@ -10,7 +10,7 @@ jobs: build: uses: huggingface/doc-builder/.github/workflows/upload_pr_documentation.yml@main with: - package_name: api-inference + package_name: inference-providers secrets: hf_token: ${{ secrets.HF_DOC_BUILD_PUSH }} comment_bot_token: ${{ secrets.COMMENT_BOT_TOKEN }} \ No newline at end of file diff --git a/docs/api-inference/tasks/audio-classification.md b/docs/api-inference/tasks/audio-classification.md index 47144b754..eea7b1daa 100644 --- a/docs/api-inference/tasks/audio-classification.md +++ b/docs/api-inference/tasks/audio-classification.md @@ -1,8 +1,8 @@