


'''simple docstring'''
import unittest

from transformers import load_tool
from transformers.utils import is_torch_available


if is_torch_available():
  import torch

from transformers.testing_utils import require_torch

from .test_tools_common import ToolTesterMixin




@require_torch
class 			lowerCamelCase_   (	unittest.TestCase     ,       __a      ):






      def lowercase_							(					self				:    Union[str, Any] ):


          '''simple docstring'''


          UpperCAmelCase__			:		Optional[Any]													=				load_tool('''text-to-speech''' )
          self.tool.setup()






      def lowercase_							(					self				:    Tuple ):


          '''simple docstring'''


          torch.manual_seed(0 )
          UpperCAmelCase__			:		Any													=				self.tool('''hey''' )
          UpperCAmelCase__			:		Optional[Any]													=				result.to_raw()
          self.assertTrue(
              torch.allclose(
                  resulting_tensor[:3]						,						torch.tensor([-0.0_0_0_5_9_6_6_6_6_8_8_3_2_1_1_5_8_2_9, -0.0_0_0_3_6_5_7_6_4_0_1_9_0_7_9_5_0_6_4, -0.0_0_0_1_3_4_3_9_5_0_2_7_9_9_8_8_3_4_8_5] )						,						) )






      def lowercase_							(					self				:    Any ):


          '''simple docstring'''


          torch.manual_seed(0 )
          UpperCAmelCase__			:		List[str]													=				self.tool('''hey''' )
          UpperCAmelCase__			:		Dict													=				result.to_raw()
          self.assertTrue(
              torch.allclose(
                  resulting_tensor[:3]						,						torch.tensor([-0.0_0_0_5_9_6_6_6_6_8_8_3_2_1_1_5_8_2_9, -0.0_0_0_3_6_5_7_6_4_0_1_9_0_7_9_5_0_6_4, -0.0_0_0_1_3_4_3_9_5_0_2_7_9_9_8_8_3_4_8_5] )						,						) )




'''simple docstring'''
import unittest

from accelerate import debug_launcher
from accelerate.test_utils import require_cpu, test_ops, test_script




@require_cpu
class 			lowerCamelCase_   (	unittest.TestCase      ):






      def lowercase_							(					self				:    Tuple ):


          '''simple docstring'''


          debug_launcher(test_script.main )






      def lowercase_							(					self				:    List[str] ):


          '''simple docstring'''


          debug_launcher(test_ops.main )
