



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=1_337 ,		num_examples=42 ,		dataset_name="""my_dataset"""		)}		),
        SplitDict({"""train""": SplitInfo(name="""train""" ,		num_bytes=1_337 ,		num_examples=42		)}		),
        SplitDict({"""train""": SplitInfo()}		),
    ] ,		)
def 			A_      (	__a     :				SplitDict		):

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




@pytest.mark.parametrize(
    """split_info""" ,		[SplitInfo(), SplitInfo(dataset_name=a_		), SplitInfo(dataset_name="""my_dataset"""		)]		)
def 			A_      (	__a     :				Dict		):

    """simple docstring"""
    a__				      =		asdict(SplitDict({"""train""": split_info}		)		)
    assert "dataset_name" in split_dict_asdict["train"]
    assert split_dict_asdict["train"]["dataset_name"] == split_info.dataset_name






from .configuration_bert_masked import MaskedBertConfig
from .modeling_bert_masked import (
    MaskedBertForMultipleChoice,
    MaskedBertForQuestionAnswering,
    MaskedBertForSequenceClassification,
    MaskedBertForTokenClassification,
    MaskedBertModel,
)
from .modules import *

