Skip to content

Commit 187541c

Browse files
committed
Merge branch 'main' into test-disable-transformer-containers-in-docs-ci
2 parents 530f928 + 1e442be commit 187541c

File tree

166 files changed

+9100
-891
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

166 files changed

+9100
-891
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Build Inference API documentation
2+
3+
on:
4+
push:
5+
paths:
6+
- "docs/api-inference/**"
7+
branches:
8+
- main
9+
10+
jobs:
11+
build:
12+
uses: huggingface/doc-builder/.github/workflows/build_main_documentation.yml@main
13+
with:
14+
commit_sha: ${{ github.sha }}
15+
package: hub-docs
16+
package_name: api-inference
17+
path_to_docs: hub-docs/docs/api-inference/
18+
additional_args: --not_python_module
19+
secrets:
20+
hf_token: ${{ secrets.HF_DOC_BUILD_PUSH }}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Build Inference API PR Documentation
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- "docs/api-inference/**"
7+
8+
concurrency:
9+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
10+
cancel-in-progress: true
11+
12+
jobs:
13+
build:
14+
uses: huggingface/doc-builder/.github/workflows/build_pr_documentation.yml@main
15+
with:
16+
commit_sha: ${{ github.event.pull_request.head.sha }}
17+
pr_number: ${{ github.event.number }}
18+
package: hub-docs
19+
package_name: api-inference
20+
path_to_docs: hub-docs/docs/api-inference/
21+
additional_args: --not_python_module
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Upload Inference API PR Documentation
2+
3+
on:
4+
workflow_run:
5+
workflows: ["Build Inference API PR Documentation"]
6+
types:
7+
- completed
8+
9+
jobs:
10+
build:
11+
uses: huggingface/doc-builder/.github/workflows/upload_pr_documentation.yml@main
12+
with:
13+
package_name: api-inference
14+
secrets:
15+
hf_token: ${{ secrets.HF_DOC_BUILD_PUSH }}
16+
comment_bot_token: ${{ secrets.COMMENT_BOT_TOKEN }}

.github/workflows/sagemaker_upload_pr_documentation.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Upload sagemaker PR Documentation
22

33
on:
44
workflow_run:
5-
workflows: ["Build sagemaker PR DocumentationDocumentation"]
5+
workflows: ["Build sagemaker PR Documentation"]
66
types:
77
- completed
88

.github/workflows/trufflehog.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Secret Leaks
2+
3+
on:
4+
push:
5+
6+
permissions:
7+
contents: read
8+
9+
jobs:
10+
trufflehog:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout code
14+
uses: actions/checkout@v4
15+
with:
16+
fetch-depth: 0
17+
- name: Secret Scanning
18+
uses: trufflesecurity/trufflehog@main

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
node_modules/
2+
__pycache__/
23
.vscode/
34
.idea/
45

datasetcard.md

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,17 @@ task_ids:
3333
- {subtask_0} # Example: extractive-qa
3434
- {subtask_1} # Example: multi-class-image-classification
3535
paperswithcode_id: {paperswithcode_id} # Dataset id on PapersWithCode (from the URL). Example for SQuAD: squad
36-
configs: # Optional for datasets with multiple configurations like glue.
37-
- {config_0} # Example for glue: sst2
38-
- {config_1} # Example for glue: cola
36+
configs: # Optional. This can be used to pass additional parameters to the dataset loader, such as `data_files`, `data_dir`, and any builder-specific parameters
37+
- config_name: {config_name_0} # Name of the dataset subset, if applicable. Example: default
38+
data_files:
39+
- split: {split_name_0} # Example: train
40+
path: {file_path_0} # Example: data.csv
41+
- split: {split_name_1} # Example: test
42+
path: {file_path_1} # Example: holdout.csv
43+
- config_name: {config_name_1} # Name of the dataset subset. Example: processed
44+
data_files:
45+
- split: {split_name_3} # Example: train
46+
path: {file_path_3} # Example: data_processed.csv
3947

4048
# Optional. This part can be used to store the feature types and size of the dataset to be used in python. This can be automatically generated using the datasets-cli.
4149
dataset_info:
@@ -61,15 +69,15 @@ dataset_info:
6169
# dtype: string
6270
# - name: answer_start
6371
# dtype: int32
64-
config_name: {config_name} # Example for glue: sst2
72+
config_name: {config_name} # Name of the dataset subset. Example for glue: sst2
6573
splits:
6674
- name: {split_name_0} # Example: train
6775
num_bytes: {split_num_bytes_0} # Example for SQuAD: 79317110
6876
num_examples: {split_num_examples_0} # Example for SQuAD: 87599
6977
download_size: {dataset_download_size} # Example for SQuAD: 35142551
7078
dataset_size: {dataset_size} # Example for SQuAD: 89789763
7179

72-
# It can also be a list of multiple configurations:
80+
# It can also be a list of multiple subsets (also called "configurations"):
7381
# ```yaml
7482
# dataset_info:
7583
# - config_name: {config0}
@@ -90,7 +98,7 @@ extra_gated_prompt: {extra_gated_prompt} # Example for speech datasets: By clic
9098

9199
# Optional. Add this if you want to encode a train and evaluation info in a structured way for AutoTrain or Evaluation on the Hub
92100
train-eval-index:
93-
- config: {config_name} # The dataset config name to use. Example for datasets without configs: default. Example for glue: sst2
101+
- config: {config_name} # The dataset subset name to use. Example for datasets without subsets: default. Example for glue: sst2
94102
task: {task_name} # The task category name (same as task_category). Example: question-answering
95103
task_id: {task_type} # The AutoTrain task id. Example: extractive_question_answering
96104
splits:

docs/TODOs.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
## For API-Inference docs:
2+
3+
From https://github.com/huggingface/hub-docs/pull/1413:
4+
* Use `<inference> for getting started
5+
* Add some screenshots: supported models
6+
* Add flow chart of how API works
7+
* Add table with all tasks
8+
* Add missing tasks: depth estimation and zero shot image classification
9+
* Some tasks have no warm models, should we remove them for now? E.g. https://huggingface.co/models?inference=warm&pipeline_tag=fill-mask&sort=trending BUT many are cold and working, so actually linking to both could make sense - internal issue https://github.com/huggingface-internal/moon-landing/issues/10966
10+
* See also this [google doc](https://docs.google.com/document/d/1xy5Ug4C_qGbqp4x3T3rj_VOyjQzQLlyce-L6I_hYi94/edit?usp=sharing)
11+
* Add CI to auto-generate the docs when handlebars template are updated

docs/api-inference/_redirects.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
quicktour: index
2+
detailed_parameters: parameters
3+
parallelism: getting_started
4+
usage: getting_started
5+
faq: index

docs/api-inference/_toctree.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
- sections:
2+
- local: index
3+
title: Serverless Inference API
4+
- local: getting-started
5+
title: Getting Started
6+
- local: supported-models
7+
title: Supported Models
8+
- local: rate-limits
9+
title: Rate Limits
10+
- local: security
11+
title: Security
12+
title: Getting Started
13+
- sections:
14+
- local: parameters
15+
title: Parameters
16+
- sections:
17+
- local: tasks/audio-classification
18+
title: Audio Classification
19+
- local: tasks/automatic-speech-recognition
20+
title: Automatic Speech Recognition
21+
- local: tasks/chat-completion
22+
title: Chat Completion
23+
- local: tasks/feature-extraction
24+
title: Feature Extraction
25+
- local: tasks/fill-mask
26+
title: Fill Mask
27+
- local: tasks/image-classification
28+
title: Image Classification
29+
- local: tasks/image-segmentation
30+
title: Image Segmentation
31+
- local: tasks/image-to-image
32+
title: Image to Image
33+
- local: tasks/image-text-to-text
34+
title: Image-Text to Text
35+
- local: tasks/object-detection
36+
title: Object Detection
37+
- local: tasks/question-answering
38+
title: Question Answering
39+
- local: tasks/summarization
40+
title: Summarization
41+
- local: tasks/table-question-answering
42+
title: Table Question Answering
43+
- local: tasks/text-classification
44+
title: Text Classification
45+
- local: tasks/text-generation
46+
title: Text Generation
47+
- local: tasks/text-to-image
48+
title: Text to Image
49+
- local: tasks/token-classification
50+
title: Token Classification
51+
- local: tasks/translation
52+
title: Translation
53+
- local: tasks/zero-shot-classification
54+
title: Zero Shot Classification
55+
title: Detailed Task Parameters
56+
title: API Reference

0 commit comments

Comments
 (0)