


from collections import namedtuple

__UpperCamelCase      						=    namedtuple('from_to', 'from_ to')

__UpperCamelCase      						=    {
    "atm": from_to(1, 1),
    "pascal": from_to(0.0000098, 1_0_1_3_2_5),
    "bar": from_to(0.986923, 1.01325),
    "kilopascal": from_to(0.00986923, 1_0_1.3_2_5),
    "megapascal": from_to(9.86923, 0.101325),
    "psi": from_to(0.068046, 14.6959),
    "inHg": from_to(0.0334211, 29.9213),
    "torr": from_to(0.00131579, 7_6_0),
}
def     UpperCamelCase_(			_A				:Tuple			,       _A				:List[str]			,       _A				:List[str]					)->						Optional[Any]:





			if from_type not in PRESSURE_CONVERSION:
						raise ValueError(
						    F'''Invalid \'from_type\' value: {from_type!r}  Supported values are:\n'''
						    + ", ".join(_A					)					)
			if to_type not in PRESSURE_CONVERSION:
						raise ValueError(
						    F'''Invalid \'to_type\' value: {to_type!r}.  Supported values are:\n'''
						    + ", ".join(_A					)					)
			return (
			    value * PRESSURE_CONVERSION[from_type].from_ * PRESSURE_CONVERSION[to_type].to
			)


if __name__ == "__main__":
						import doctest

						doctest.testmod()






from typing import Optional

from ..utils.logging import get_logger
from .audio_classificiation import AudioClassification
from .automatic_speech_recognition import AutomaticSpeechRecognition
from .base import TaskTemplate
from .image_classification import ImageClassification
from .language_modeling import LanguageModeling
from .question_answering import QuestionAnsweringExtractive
from .summarization import Summarization
from .text_classification import TextClassification


__UpperCamelCase      						=    [
    'AutomaticSpeechRecognition',
    'AudioClassification',
    'ImageClassification',
    'LanguageModeling',
    'QuestionAnsweringExtractive',
    'Summarization',
    'TaskTemplate',
    'TextClassification',
]

__UpperCamelCase      						=    get_logger(__name__)


__UpperCamelCase      						=    {
    AutomaticSpeechRecognition.task: AutomaticSpeechRecognition,
    AudioClassification.task: AudioClassification,
    ImageClassification.task: ImageClassification,
    LanguageModeling.task: LanguageModeling,
    QuestionAnsweringExtractive.task: QuestionAnsweringExtractive,
    Summarization.task: Summarization,
    TextClassification.task: TextClassification,
}
def     UpperCamelCase_(			_A				:dict					)->						Optional[TaskTemplate]:
			UpperCamelCase__   =    task_template_dict.get("task"					)
			if task_name is None:
						logger.warning(F'''Couldn\'t find template for task \'{task_name}\'. Available templates: {list(_A					)}'''					)
						return None
			UpperCamelCase__   =    NAMEaTEMPLATE.get(_A					)
			return template.from_dict(_A					)


