-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
HF transformers: Small fixes nits (#862)
HF transformers: Small fixes nits Small fixes from comments from Sarmad + me from these diffs: - #854 - #855 - #821 Main things I did - rename `refine_chat_completion_params` --> `chat_completion_params` - edit `get_text_output` to not check for `OutputDataWithValue` - sorted the init file to be alphabetical - fixed some typos/print statements - made some error messages a bit more intuitive with prompt name - sorted some imports - fixed old class name `HuggingFaceAutomaticSpeechRecognition` --> `HuggingFaceAutomaticSpeechRecognitionTransformer` ## Test Plan These are all small nits and shouldn't change functionality
- Loading branch information
Showing
9 changed files
with
72 additions
and
79 deletions.
There are no files selected for viewing
9 changes: 4 additions & 5 deletions
9
extensions/HuggingFace/python/src/aiconfig_extension_hugging_face/__init__.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,21 @@ | ||
from .local_inference.automatic_speech_recognition import HuggingFaceAutomaticSpeechRecognitionTransformer | ||
from .local_inference.image_2_text import HuggingFaceImage2TextTransformer | ||
from .local_inference.text_2_image import HuggingFaceText2ImageDiffusor | ||
from .local_inference.text_2_speech import HuggingFaceText2SpeechTransformer | ||
from .local_inference.text_generation import HuggingFaceTextGenerationTransformer | ||
from .local_inference.text_summarization import HuggingFaceTextSummarizationTransformer | ||
from .local_inference.text_translation import HuggingFaceTextTranslationTransformer | ||
from .remote_inference_client.text_generation import HuggingFaceTextGenerationParser | ||
from .local_inference.automatic_speech_recognition import HuggingFaceAutomaticSpeechRecognitionTransformer | ||
|
||
|
||
LOCAL_INFERENCE_CLASSES = [ | ||
"HuggingFaceAutomaticSpeechRecognitionTransformer", | ||
"HuggingFaceImage2TextTransformer", | ||
"HuggingFaceText2ImageDiffusor", | ||
"HuggingFaceText2SpeechTransformer", | ||
"HuggingFaceTextGenerationTransformer", | ||
"HuggingFaceTextSummarizationTransformer", | ||
"HuggingFaceTextTranslationTransformer", | ||
"HuggingFaceText2SpeechTransformer", | ||
"HuggingFaceAutomaticSpeechRecognition", | ||
"HuggingFaceImage2TextTransformer", | ||
"HuggingFaceAutomaticSpeechRecognitionTransformer", | ||
] | ||
REMOTE_INFERENCE_CLASSES = ["HuggingFaceTextGenerationParser"] | ||
__ALL__ = LOCAL_INFERENCE_CLASSES + REMOTE_INFERENCE_CLASSES |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters