'''simple docstring'''
import pytest

from datasets.splits import SplitDict, SplitInfo
from datasets.utils.py_utils import asdict



@pytest.mark.parametrize(
    '''split_dict'''							,    [
        SplitDict(),
        SplitDict({'''train''': SplitInfo(name='''train'''							,    num_bytes=1337							,    num_examples=42							,    dataset_name='''my_dataset'''					)}					),
        SplitDict({'''train''': SplitInfo(name='''train'''							,    num_bytes=1337							,    num_examples=42					)}					),
        SplitDict({'''train''': SplitInfo()}					),
    ]							,    )
def  __lowerCamelCase       (      _UpperCamelCase  :  SplitDict					):


      '''simple docstring'''


      UpperCAmelCase_            =  split_dict._to_yaml_list()
      assert len(_UpperCamelCase					) == len(_UpperCamelCase					)
      UpperCAmelCase_            =  SplitDict._from_yaml_list(_UpperCamelCase					)
      for split_name, split_info in split_dict.items():
            # dataset_name field is deprecated, and is therefore not part of the YAML dump
            UpperCAmelCase_            =  None
            # the split name of split_dict takes over the name of the split info object
            UpperCAmelCase_            =  split_name
      assert split_dict == reloaded





@pytest.mark.parametrize(
    '''split_info'''							,    [SplitInfo(), SplitInfo(dataset_name=_UpperCamelCase					), SplitInfo(dataset_name='''my_dataset'''					)]					)
def  __lowerCamelCase       (      _UpperCamelCase  :  List[str]					):


      '''simple docstring'''


      UpperCAmelCase_            =  asdict(SplitDict({'''train''': split_info}					)					)
      assert "dataset_name" in split_dict_asdict["train"]
      assert split_dict_asdict["train"]["dataset_name"] == split_info.dataset_name






'''simple docstring'''
from ...utils import logging
from ..ta.modeling_tf_ta import TFTaEncoderModel, TFTaForConditionalGeneration, TFTaModel
from .configuration_mta import MTaConfig


lowercase__  :      Dict        =					logging.get_logger(__name__)

lowercase__  :      List[Any]        =					"T5Config"







class lowerCamelCase							(	lowerCamelCase					):




  '''simple docstring'''



  lowerCAmelCase__										=	'''mt5'''
  lowerCAmelCase__										=	MTaConfig







class lowerCamelCase							(	lowerCamelCase					):




  '''simple docstring'''



  lowerCAmelCase__										=	'''mt5'''
  lowerCAmelCase__										=	MTaConfig







class lowerCamelCase							(	lowerCamelCase					):




  '''simple docstring'''



  lowerCAmelCase__										=	'''mt5'''
  lowerCAmelCase__										=	MTaConfig





