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

[Bot] Update inference types #2688

Merged
merged 21 commits into from
Dec 3, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
15d8612
Update inference types (automated commit)
Wauplin Nov 19, 2024
bad1919
Merge branch 'main' into update-inference-types-automated-pr
hanouticelina Nov 20, 2024
b9b3421
fix quality after merging main
hanouticelina Nov 20, 2024
b66ba40
another fix
hanouticelina Nov 20, 2024
690decf
fix tests
hanouticelina Nov 20, 2024
05df70f
Update inference types (automated commit)
Wauplin Nov 21, 2024
d274efb
Merge branch 'update-inference-types-automated-pr' of github.com:hugg…
hanouticelina Nov 21, 2024
a6e1cd2
Update inference types (automated commit)
Wauplin Nov 22, 2024
33840be
Merge branch 'main' into update-inference-types-automated-pr
hanouticelina Nov 22, 2024
817dafb
Merge branch 'update-inference-types-automated-pr' of github.com:hugg…
hanouticelina Nov 22, 2024
c63d566
fix quality
hanouticelina Nov 22, 2024
911c175
Update inference types (automated commit)
Wauplin Nov 24, 2024
69f20bc
Merge branch 'update-inference-types-automated-pr' of github.com:hugg…
hanouticelina Nov 24, 2024
08d3f65
Update inference types (automated commit)
Wauplin Nov 28, 2024
4dc3c30
Merge branch 'main' into update-inference-types-automated-pr
hanouticelina Nov 28, 2024
6aa17d6
Merge branch 'update-inference-types-automated-pr' of github.com:hugg…
hanouticelina Nov 28, 2024
5a0772e
Update inference types (automated commit)
Wauplin Dec 3, 2024
295f1f5
Merge branch 'update-inference-types-automated-pr' of github.com:hugg…
hanouticelina Dec 3, 2024
675a6ca
fix client
hanouticelina Dec 3, 2024
8834ad4
activate automatic update for table-question-answering
hanouticelina Dec 3, 2024
0d8b5f9
fix
hanouticelina Dec 3, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@

@dataclass
class AudioClassificationParameters(BaseInferenceType):
"""Additional inference parameters
Additional inference parameters for Audio Classification
"""
"""Additional inference parameters for Audio Classification"""

function_to_apply: Optional["AudioClassificationOutputTransform"] = None
"""The function to apply to the model outputs in order to retrieve the scores."""
Expand All @@ -33,7 +31,7 @@ class AudioClassificationInput(BaseInferenceType):
also provide the audio data as a raw bytes payload.
"""
parameters: Optional[AudioClassificationParameters] = None
"""Additional inference parameters"""
"""Additional inference parameters for Audio Classification"""


@dataclass
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@

@dataclass
class AutomaticSpeechRecognitionGenerationParameters(BaseInferenceType):
"""Parametrization of the text generation process
Ad-hoc parametrization of the text generation process
"""
"""Parametrization of the text generation process"""

do_sample: Optional[bool] = None
"""Whether to use sampling instead of greedy decoding when generating new tokens."""
Expand Down Expand Up @@ -76,9 +74,7 @@ class AutomaticSpeechRecognitionGenerationParameters(BaseInferenceType):

@dataclass
class AutomaticSpeechRecognitionParameters(BaseInferenceType):
"""Additional inference parameters
Additional inference parameters for Automatic Speech Recognition
"""
"""Additional inference parameters for Automatic Speech Recognition"""

generation_parameters: Optional[AutomaticSpeechRecognitionGenerationParameters] = None
"""Parametrization of the text generation process"""
Expand All @@ -95,7 +91,7 @@ class AutomaticSpeechRecognitionInput(BaseInferenceType):
also provide the audio data as a raw bytes payload.
"""
parameters: Optional[AutomaticSpeechRecognitionParameters] = None
"""Additional inference parameters"""
"""Additional inference parameters for Automatic Speech Recognition"""


@dataclass
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class DepthEstimationInput(BaseInferenceType):
inputs: Any
"""The input image data"""
parameters: Optional[Dict[str, Any]] = None
"""Additional inference parameters"""
"""Additional inference parameters for Depth Estimation"""


@dataclass
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@ class DocumentQuestionAnsweringInputData(BaseInferenceType):

@dataclass
class DocumentQuestionAnsweringParameters(BaseInferenceType):
"""Additional inference parameters
Additional inference parameters for Document Question Answering
"""
"""Additional inference parameters for Document Question Answering"""

doc_stride: Optional[int] = None
"""If the words in the document are too long to fit with the question for the model, it will
Expand Down Expand Up @@ -62,7 +60,7 @@ class DocumentQuestionAnsweringInput(BaseInferenceType):
inputs: DocumentQuestionAnsweringInputData
"""One (document, question) pair to answer"""
parameters: Optional[DocumentQuestionAnsweringParameters] = None
"""Additional inference parameters"""
"""Additional inference parameters for Document Question Answering"""


@dataclass
Expand Down
6 changes: 2 additions & 4 deletions src/huggingface_hub/inference/_generated/types/fill_mask.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@

@dataclass
class FillMaskParameters(BaseInferenceType):
"""Additional inference parameters
Additional inference parameters for Fill Mask
"""
"""Additional inference parameters for Fill Mask"""

targets: Optional[List[str]] = None
"""When passed, the model will limit the scores to the passed targets instead of looking up
Expand All @@ -32,7 +30,7 @@ class FillMaskInput(BaseInferenceType):
inputs: str
"""The text with masked tokens"""
parameters: Optional[FillMaskParameters] = None
"""Additional inference parameters"""
"""Additional inference parameters for Fill Mask"""


@dataclass
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@

@dataclass
class ImageClassificationParameters(BaseInferenceType):
"""Additional inference parameters
Additional inference parameters for Image Classification
"""
"""Additional inference parameters for Image Classification"""

function_to_apply: Optional["ImageClassificationOutputTransform"] = None
"""The function to apply to the model outputs in order to retrieve the scores."""
Expand All @@ -33,7 +31,7 @@ class ImageClassificationInput(BaseInferenceType):
also provide the image data as a raw bytes payload.
"""
parameters: Optional[ImageClassificationParameters] = None
"""Additional inference parameters"""
"""Additional inference parameters for Image Classification"""


@dataclass
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@

@dataclass
class ImageSegmentationParameters(BaseInferenceType):
"""Additional inference parameters
Additional inference parameters for Image Segmentation
"""
"""Additional inference parameters for Image Segmentation"""

mask_threshold: Optional[float] = None
"""Threshold to use when turning the predicted masks into binary values."""
Expand All @@ -37,7 +35,7 @@ class ImageSegmentationInput(BaseInferenceType):
also provide the image data as a raw bytes payload.
"""
parameters: Optional[ImageSegmentationParameters] = None
"""Additional inference parameters"""
"""Additional inference parameters for Image Segmentation"""


@dataclass
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,7 @@ class ImageToImageTargetSize(BaseInferenceType):

@dataclass
class ImageToImageParameters(BaseInferenceType):
"""Additional inference parameters
Additional inference parameters for Image To Image
"""
"""Additional inference parameters for Image To Image"""

guidance_scale: Optional[float] = None
"""For diffusion models. A higher guidance scale value encourages the model to generate
Expand All @@ -46,7 +44,7 @@ class ImageToImageInput(BaseInferenceType):
also provide the image data as a raw bytes payload.
"""
parameters: Optional[ImageToImageParameters] = None
"""Additional inference parameters"""
"""Additional inference parameters for Image To Image"""


@dataclass
Expand Down
10 changes: 3 additions & 7 deletions src/huggingface_hub/inference/_generated/types/image_to_text.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@

@dataclass
class ImageToTextGenerationParameters(BaseInferenceType):
"""Parametrization of the text generation process
Ad-hoc parametrization of the text generation process
"""
"""Parametrization of the text generation process"""

do_sample: Optional[bool] = None
"""Whether to use sampling instead of greedy decoding when generating new tokens."""
Expand Down Expand Up @@ -76,9 +74,7 @@ class ImageToTextGenerationParameters(BaseInferenceType):

@dataclass
class ImageToTextParameters(BaseInferenceType):
"""Additional inference parameters
Additional inference parameters for Image To Text
"""
"""Additional inference parameters for Image To Text"""

generation_parameters: Optional[ImageToTextGenerationParameters] = None
"""Parametrization of the text generation process"""
Expand All @@ -93,7 +89,7 @@ class ImageToTextInput(BaseInferenceType):
inputs: Any
"""The input image data"""
parameters: Optional[ImageToTextParameters] = None
"""Additional inference parameters"""
"""Additional inference parameters for Image To Text"""


@dataclass
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@

@dataclass
class ObjectDetectionParameters(BaseInferenceType):
"""Additional inference parameters
Additional inference parameters for Object Detection
"""
"""Additional inference parameters for Object Detection"""

threshold: Optional[float] = None
"""The probability necessary to make a prediction."""
Expand All @@ -28,7 +26,7 @@ class ObjectDetectionInput(BaseInferenceType):
also provide the image data as a raw bytes payload.
"""
parameters: Optional[ObjectDetectionParameters] = None
"""Additional inference parameters"""
"""Additional inference parameters for Object Detection"""


@dataclass
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@ class QuestionAnsweringInputData(BaseInferenceType):

@dataclass
class QuestionAnsweringParameters(BaseInferenceType):
"""Additional inference parameters
Additional inference parameters for Question Answering
"""
"""Additional inference parameters for Question Answering"""

align_to_words: Optional[bool] = None
"""Attempts to align the answer to real words. Improves quality on space separated
Expand Down Expand Up @@ -60,7 +58,7 @@ class QuestionAnsweringInput(BaseInferenceType):
inputs: QuestionAnsweringInputData
"""One (context, question) pair to answer"""
parameters: Optional[QuestionAnsweringParameters] = None
"""Additional inference parameters"""
"""Additional inference parameters for Question Answering"""


@dataclass
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ class SentenceSimilarityInput(BaseInferenceType):

inputs: SentenceSimilarityInputData
parameters: Optional[Dict[str, Any]] = None
"""Additional inference parameters"""
"""Additional inference parameters for Sentence Similarity"""
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@

@dataclass
class SummarizationParameters(BaseInferenceType):
"""Additional inference parameters.
Additional inference parameters for summarization.
"""
"""Additional inference parameters for summarization."""

clean_up_tokenization_spaces: Optional[bool] = None
"""Whether to clean up the potential extra spaces in the text output."""
Expand All @@ -33,7 +31,7 @@ class SummarizationInput(BaseInferenceType):
inputs: str
"""The input text to summarize."""
parameters: Optional[SummarizationParameters] = None
"""Additional inference parameters."""
"""Additional inference parameters for summarization."""


@dataclass
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class TableQuestionAnsweringInput(BaseInferenceType):
inputs: TableQuestionAnsweringInputData
"""One (table, question) pair to answer"""
parameters: Optional[Dict[str, Any]] = None
"""Additional inference parameters"""
"""Additional inference parameters for Table Question Answering"""


@dataclass
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@

@dataclass
class Text2TextGenerationParameters(BaseInferenceType):
"""Additional inference parameters
Additional inference parameters for Text2text Generation
"""
"""Additional inference parameters for Text2text Generation"""

clean_up_tokenization_spaces: Optional[bool] = None
"""Whether to clean up the potential extra spaces in the text output."""
Expand All @@ -33,7 +31,7 @@ class Text2TextGenerationInput(BaseInferenceType):
inputs: str
"""The input text data"""
parameters: Optional[Text2TextGenerationParameters] = None
"""Additional inference parameters"""
"""Additional inference parameters for Text2text Generation"""


@dataclass
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@

@dataclass
class TextClassificationParameters(BaseInferenceType):
"""Additional inference parameters
Additional inference parameters for Text Classification
"""
"""Additional inference parameters for Text Classification"""

function_to_apply: Optional["TextClassificationOutputTransform"] = None
"""The function to apply to the model outputs in order to retrieve the scores."""
Expand All @@ -31,7 +29,7 @@ class TextClassificationInput(BaseInferenceType):
inputs: str
"""The text to classify"""
parameters: Optional[TextClassificationParameters] = None
"""Additional inference parameters"""
"""Additional inference parameters for Text Classification"""


@dataclass
Expand Down
10 changes: 3 additions & 7 deletions src/huggingface_hub/inference/_generated/types/text_to_audio.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@

@dataclass
class TextToAudioGenerationParameters(BaseInferenceType):
"""Parametrization of the text generation process
Ad-hoc parametrization of the text generation process
"""
"""Parametrization of the text generation process"""

do_sample: Optional[bool] = None
"""Whether to use sampling instead of greedy decoding when generating new tokens."""
Expand Down Expand Up @@ -76,9 +74,7 @@ class TextToAudioGenerationParameters(BaseInferenceType):

@dataclass
class TextToAudioParameters(BaseInferenceType):
"""Additional inference parameters
Additional inference parameters for Text To Audio
"""
"""Additional inference parameters for Text To Audio"""

generation_parameters: Optional[TextToAudioGenerationParameters] = None
"""Parametrization of the text generation process"""
Expand All @@ -91,7 +87,7 @@ class TextToAudioInput(BaseInferenceType):
inputs: str
"""The input text data"""
parameters: Optional[TextToAudioParameters] = None
"""Additional inference parameters"""
"""Additional inference parameters for Text To Audio"""


@dataclass
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,7 @@ class TextToImageTargetSize(BaseInferenceType):

@dataclass
class TextToImageParameters(BaseInferenceType):
"""Additional inference parameters
Additional inference parameters for Text To Image
"""
"""Additional inference parameters for Text To Image"""

guidance_scale: Optional[float] = None
"""A higher guidance scale value encourages the model to generate images closely linked to
Expand All @@ -48,7 +46,7 @@ class TextToImageInput(BaseInferenceType):
inputs: str
"""The input text data (sometimes called "prompt")"""
parameters: Optional[TextToImageParameters] = None
"""Additional inference parameters"""
"""Additional inference parameters for Text To Image"""


@dataclass
Expand Down
10 changes: 3 additions & 7 deletions src/huggingface_hub/inference/_generated/types/text_to_speech.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@

@dataclass
class TextToSpeechGenerationParameters(BaseInferenceType):
"""Parametrization of the text generation process
Ad-hoc parametrization of the text generation process
"""
"""Parametrization of the text generation process"""

do_sample: Optional[bool] = None
"""Whether to use sampling instead of greedy decoding when generating new tokens."""
Expand Down Expand Up @@ -76,9 +74,7 @@ class TextToSpeechGenerationParameters(BaseInferenceType):

@dataclass
class TextToSpeechParameters(BaseInferenceType):
"""Additional inference parameters
Additional inference parameters for Text To Speech
"""
"""Additional inference parameters for Text To Speech"""

generation_parameters: Optional[TextToSpeechGenerationParameters] = None
"""Parametrization of the text generation process"""
Expand All @@ -91,7 +87,7 @@ class TextToSpeechInput(BaseInferenceType):
inputs: str
"""The input text data"""
parameters: Optional[TextToSpeechParameters] = None
"""Additional inference parameters"""
"""Additional inference parameters for Text To Speech"""


@dataclass
Expand Down
Loading
Loading