





import time
from dataclasses import dataclass
from multiprocessing import Pool
from unittest import TestCase
from unittest.mock import patch

import multiprocess
import numpy as np
import pytest

from datasets.utils.py_utils import (
    NestedDataStructure,
    asdict,
    iflatmap_unordered,
    map_nested,
    temp_seed,
    temporary_assignment,
    zip_dict,
)

from .utils import require_tf, require_torch





def        _lowercase   (  _UpperCAmelCase			)  ->					Tuple:  # picklable for multiprocessing
				return x.sum()





def        _lowercase   (  _UpperCAmelCase			)  ->					Tuple:  # picklable for multiprocessing
				return i + 1

@dataclass
class  __A       :






				"""simple docstring"""




				__A								=			42
				__A								=			42




class  __A       (  a      ):






				"""simple docstring"""




				def _snake_case    (						self							):
								lowerCamelCase			={}
								lowerCamelCase			=[]
								lowerCamelCase			=1
								lowerCamelCase			=[1, 2]
								lowerCamelCase			={'a': 1, 'b': 2}
								lowerCamelCase			={'a': [1, 2], 'b': [3, 4]}
								lowerCamelCase			={'a': {'1': 1}, 'b': 2}
								lowerCamelCase			={'a': 1, 'b': 2, 'c': 3, 'd': 4}
								lowerCamelCase			={}
								lowerCamelCase			=[]
								lowerCamelCase			=2
								lowerCamelCase			=[2, 3]
								lowerCamelCase			={'a': 2, 'b': 3}
								lowerCamelCase			={'a': [2, 3], 'b': [4, 5]}
								lowerCamelCase			={'a': {'1': 2}, 'b': 3}
								lowerCamelCase			={'a': 2, 'b': 3, 'c': 4, 'd': 5}
								self.assertEqual(map_nested(UpperCAmelCase_				,	UpperCAmelCase_							)				,	UpperCAmelCase_							)
								self.assertEqual(map_nested(UpperCAmelCase_				,	UpperCAmelCase_							)				,	UpperCAmelCase_							)
								self.assertEqual(map_nested(UpperCAmelCase_				,	UpperCAmelCase_							)				,	UpperCAmelCase_							)
								self.assertEqual(map_nested(UpperCAmelCase_				,	UpperCAmelCase_							)				,	UpperCAmelCase_							)
								self.assertEqual(map_nested(UpperCAmelCase_				,	UpperCAmelCase_							)				,	UpperCAmelCase_							)
								self.assertEqual(map_nested(UpperCAmelCase_				,	UpperCAmelCase_							)				,	UpperCAmelCase_							)
								self.assertEqual(map_nested(UpperCAmelCase_				,	UpperCAmelCase_							)				,	UpperCAmelCase_							)
								self.assertEqual(map_nested(UpperCAmelCase_				,	UpperCAmelCase_							)				,	UpperCAmelCase_							)

								lowerCamelCase			=2
								self.assertEqual(map_nested(UpperCAmelCase_				,	UpperCAmelCase_				,	num_proc=UpperCAmelCase_							)				,	UpperCAmelCase_							)
								self.assertEqual(map_nested(UpperCAmelCase_				,	UpperCAmelCase_				,	num_proc=UpperCAmelCase_							)				,	UpperCAmelCase_							)
								self.assertEqual(map_nested(UpperCAmelCase_				,	UpperCAmelCase_				,	num_proc=UpperCAmelCase_							)				,	UpperCAmelCase_							)
								self.assertEqual(map_nested(UpperCAmelCase_				,	UpperCAmelCase_				,	num_proc=UpperCAmelCase_							)				,	UpperCAmelCase_							)
								self.assertEqual(map_nested(UpperCAmelCase_				,	UpperCAmelCase_				,	num_proc=UpperCAmelCase_							)				,	UpperCAmelCase_							)
								self.assertEqual(map_nested(UpperCAmelCase_				,	UpperCAmelCase_				,	num_proc=UpperCAmelCase_							)				,	UpperCAmelCase_							)
								self.assertEqual(map_nested(UpperCAmelCase_				,	UpperCAmelCase_				,	num_proc=UpperCAmelCase_							)				,	UpperCAmelCase_							)
								self.assertEqual(map_nested(UpperCAmelCase_				,	UpperCAmelCase_				,	num_proc=UpperCAmelCase_							)				,	UpperCAmelCase_							)

								lowerCamelCase			={'a': np.eye(2							), 'b': np.zeros(3							), 'c': np.ones(2							)}
								lowerCamelCase			={'a': 2, 'b': 0, 'c': 2}
								lowerCamelCase			={
								    'a': np.eye(2							).astype(UpperCAmelCase_							),
								    'b': np.zeros(3							).astype(UpperCAmelCase_							),
								    'c': np.ones(2							).astype(UpperCAmelCase_							),
								}
								self.assertEqual(map_nested(UpperCAmelCase_				,	UpperCAmelCase_				,	map_numpy=UpperCAmelCase_							)				,	UpperCAmelCase_							)
								self.assertEqual(
								    {k: v.tolist() for k, v in map_nested(UpperCAmelCase_				,	UpperCAmelCase_				,	map_numpy=UpperCAmelCase_							).items()}				,	{k: v.tolist() for k, v in expected_map_nested_sna_int.items()}				,	)
								self.assertEqual(map_nested(UpperCAmelCase_				,	UpperCAmelCase_				,	map_numpy=UpperCAmelCase_				,	num_proc=UpperCAmelCase_							)				,	UpperCAmelCase_							)
								self.assertEqual(
								    {k: v.tolist() for k, v in map_nested(UpperCAmelCase_				,	UpperCAmelCase_				,	map_numpy=UpperCAmelCase_				,	num_proc=UpperCAmelCase_							).items()}				,	{k: v.tolist() for k, v in expected_map_nested_sna_int.items()}				,	)
								with self.assertRaises(UpperCAmelCase_							):  # can't pickle a local lambda
												map_nested(lambda UpperCAmelCase_							: x + 1				,	UpperCAmelCase_				,	num_proc=UpperCAmelCase_							)


				def _snake_case    (						self							):
								lowerCamelCase			={'a': 1, 'b': 2}
								lowerCamelCase			={'a': 3, 'b': 4}
								lowerCamelCase			={'a': 5, 'b': 6}
								lowerCamelCase			=sorted([("""a""", (1, 3, 5)), ("""b""", (2, 4, 6))]							)
								self.assertEqual(sorted(zip_dict(UpperCAmelCase_				,	UpperCAmelCase_				,	UpperCAmelCase_							)							)				,	UpperCAmelCase_							)


				def _snake_case    (						self							):

								class  __A       :






												"""simple docstring"""




												__A								=			"""bar"""




								lowerCamelCase			=Foo()
								self.assertEqual(foo.my_attr				,	"""bar"""							)
								with temporary_assignment(UpperCAmelCase_				,	"""my_attr"""				,	"""BAR"""							):
												self.assertEqual(foo.my_attr				,	"""BAR"""							)
								self.assertEqual(foo.my_attr				,	"""bar"""							)





@pytest.mark.parametrize(
    """iterable_length, num_proc, expected_num_proc"""     , [
        (1, None, 1),
        (1, 1, 1),
        (2, None, 1),
        (2, 1, 1),
        (2, 2, 1),
        (2, 3, 1),
        (3, 2, 1),
        (16, 16, 16),
        (16, 17, 16),
        (17, 16, 16),
    ]     , )
def        _lowercase   (  _UpperCAmelCase     , _UpperCAmelCase     , _UpperCAmelCase			)  ->					Union[str, Any]:
				with patch("""datasets.utils.py_utils._single_map_nested"""			) as mock_single_map_nested, patch(
				    """datasets.parallel.parallel.Pool"""			) as mock_multiprocessing_pool:
								lowerCamelCase			={F"""{i}""": i for i in range(lowercase__			)}
								lowerCamelCase			=map_nested(lambda _UpperCAmelCase			: x + 10     , lowercase__     , num_proc=lowercase__     , parallel_min_length=16			)
								if expected_num_proc == 1:
												assert mock_single_map_nested.called
												assert not mock_multiprocessing_pool.called
								else:
												assert not mock_single_map_nested.called
												assert mock_multiprocessing_pool.called
												assert mock_multiprocessing_pool.call_args[0][0] == expected_num_proc

class  __A       (  a      ):






				"""simple docstring"""




				@require_tf
				def _snake_case    (						self							):
								import tensorflow as tf
								from tensorflow.keras import layers

								lowerCamelCase			=layers.Dense(2							)

								def gen_random_output():
												lowerCamelCase			=tf.random.uniform((1, 3)							)
												return model(UpperCAmelCase_							).numpy()

								with temp_seed(42				,	set_tensorflow=UpperCAmelCase_							):
												lowerCamelCase			=gen_random_output()
								with temp_seed(42				,	set_tensorflow=UpperCAmelCase_							):
												lowerCamelCase			=gen_random_output()
								lowerCamelCase			=gen_random_output()

								np.testing.assert_equal(UpperCAmelCase_				,	UpperCAmelCase_							)
								self.assertGreater(np.abs(outa - outa							).sum()				,	0							)


				@require_torch
				def _snake_case    (						self							):
								import torch

								def gen_random_output():
												lowerCamelCase			=torch.nn.Linear(3				,	2							)
												lowerCamelCase			=torch.rand(1				,	3							)
												return model(UpperCAmelCase_							).detach().numpy()

								with temp_seed(42				,	set_pytorch=UpperCAmelCase_							):
												lowerCamelCase			=gen_random_output()
								with temp_seed(42				,	set_pytorch=UpperCAmelCase_							):
												lowerCamelCase			=gen_random_output()
								lowerCamelCase			=gen_random_output()

								np.testing.assert_equal(UpperCAmelCase_				,	UpperCAmelCase_							)
								self.assertGreater(np.abs(outa - outa							).sum()				,	0							)


				def _snake_case    (						self							):
								def gen_random_output():
												return np.random.rand(1				,	3							)

								with temp_seed(42							):
												lowerCamelCase			=gen_random_output()
								with temp_seed(42							):
												lowerCamelCase			=gen_random_output()
								lowerCamelCase			=gen_random_output()

								np.testing.assert_equal(UpperCAmelCase_				,	UpperCAmelCase_							)
								self.assertGreater(np.abs(outa - outa							).sum()				,	0							)





@pytest.mark.parametrize("""input_data"""     , [{}]			)
def        _lowercase   (  _UpperCAmelCase			)  ->					Optional[int]:
				lowerCamelCase			=NestedDataStructure(lowercase__			).data
				assert output_data == input_data





@pytest.mark.parametrize(
    """data, expected_output"""     , [
        ({}, []),
        ([], []),
        ("""foo""", ["""foo"""]),
        (["""foo""", """bar"""], ["""foo""", """bar"""]),
        ([["""foo""", """bar"""]], ["""foo""", """bar"""]),
        ([[["""foo"""], ["""bar"""]]], ["""foo""", """bar"""]),
        ([[["""foo"""], """bar"""]], ["""foo""", """bar"""]),
        ({"""a""": 1, """b""": 2}, [1, 2]),
        ({"""a""": [1, 2], """b""": [3, 4]}, [1, 2, 3, 4]),
        ({"""a""": [[1, 2]], """b""": [[3, 4]]}, [1, 2, 3, 4]),
        ({"""a""": [[1, 2]], """b""": [3, 4]}, [1, 2, 3, 4]),
        ({"""a""": [[[1], [2]]], """b""": [[[3], [4]]]}, [1, 2, 3, 4]),
        ({"""a""": [[[1], [2]]], """b""": [[3, 4]]}, [1, 2, 3, 4]),
        ({"""a""": [[[1], [2]]], """b""": [3, 4]}, [1, 2, 3, 4]),
        ({"""a""": [[[1], [2]]], """b""": [3, [4]]}, [1, 2, 3, 4]),
        ({"""a""": {"""1""": 1}, """b""": 2}, [1, 2]),
        ({"""a""": {"""1""": [1]}, """b""": 2}, [1, 2]),
        ({"""a""": {"""1""": [1]}, """b""": [2]}, [1, 2]),
    ]     , )
def        _lowercase   (  _UpperCAmelCase     , _UpperCAmelCase			)  ->					Optional[Any]:
				lowerCamelCase			=NestedDataStructure(lowercase__			).flatten()
				assert output == expected_output





def        _lowercase   (  )  ->					str:
				lowerCamelCase			=A(x=1     , y="""foobar"""			)
				lowerCamelCase			={'x': 1, 'y': 'foobar'}
				assert asdict(lowercase__			) == expected_output

				lowerCamelCase			={'a': {'b': A(x=10     , y="""foo"""			)}, 'c': [A(x=20     , y="""bar"""			)]}
				lowerCamelCase			={'a': {'b': {'x': 10, 'y': 'foo'}}, 'c': [{'x': 20, 'y': 'bar'}]}
				assert asdict(lowercase__			) == expected_output

				with pytest.raises(lowercase__			):
								asdict([1, A(x=10     , y="""foo"""			)]			)





def        _lowercase   (  _UpperCAmelCase			)  ->					int:
				return text.split()





def        _lowercase   (  _UpperCAmelCase			)  ->					Optional[int]:
				yield (time.time(), content)
				time.sleep(2			)
				yield (time.time(), content)





def        _lowercase   (  )  ->					Dict:
				with Pool(2			) as pool:
								lowerCamelCase			=list(iflatmap_unordered(lowercase__     , _split_text     , kwargs_iterable=[{"""text""": """hello there"""}] * 10			)			)
								assert out.count("""hello"""			) == 10
								assert out.count("""there"""			) == 10
								assert len(lowercase__			) == 20

				# check multiprocess from pathos (uses dill for pickling)
				with multiprocess.Pool(2			) as pool:
								lowerCamelCase			=list(iflatmap_unordered(lowercase__     , _split_text     , kwargs_iterable=[{"""text""": """hello there"""}] * 10			)			)
								assert out.count("""hello"""			) == 10
								assert out.count("""there"""			) == 10
								assert len(lowercase__			) == 20

				# check that we get items as fast as possible
				with Pool(2			) as pool:
								lowerCamelCase			=[]
								for yield_time, content in iflatmap_unordered(
								    lowercase__     , _aseconds_generator_of_aitems_with_timing     , kwargs_iterable=[{"""content""": """a"""}, {"""content""": """b"""}]			):
												assert yield_time < time.time() + 0.1, "we should each item directly after it was yielded"
												out.append(lowercase__			)
								assert out.count("""a"""			) == 2
								assert out.count("""b"""			) == 2
								assert len(lowercase__			) == 4












import os
import unicodedata
from shutil import copyfile
from typing import Any, Dict, List, Optional, Tuple

import sentencepiece as spm

from ...tokenization_utils import AddedToken, PreTrainedTokenizer
from ...utils import SPIECE_UNDERLINE, logging


UpperCAmelCase__  :     List[Any]   			=logging.get_logger(__name__)

UpperCAmelCase__  :     Dict   			={'''vocab_file''': '''spiece.model'''}

UpperCAmelCase__  :     Dict   			={
    '''vocab_file''': {
        '''xlnet-base-cased''': '''https://huggingface.co/xlnet-base-cased/resolve/main/spiece.model''',
        '''xlnet-large-cased''': '''https://huggingface.co/xlnet-large-cased/resolve/main/spiece.model''',
    }
}

UpperCAmelCase__  :     List[str]   			={
    '''xlnet-base-cased''': None,
    '''xlnet-large-cased''': None,
}

# Segments (not really needed)
UpperCAmelCase__  :     Any   			=0
UpperCAmelCase__  :     List[Any]   			=1
UpperCAmelCase__  :     Union[str, Any]   			=2
UpperCAmelCase__  :     Tuple   			=3
UpperCAmelCase__  :     int   			=4

class  __A       (  a      ):
				__A								=			VOCAB_FILES_NAMES
				__A								=			PRETRAINED_VOCAB_FILES_MAP
				__A								=			PRETRAINED_POSITIONAL_EMBEDDINGS_SIZES
				__A								=			"""left"""


				def __init__(						self				,	UpperCAmelCase_				,	UpperCAmelCase_=False				,	UpperCAmelCase_=True				,	UpperCAmelCase_=False				,	UpperCAmelCase_="<s>"				,	UpperCAmelCase_="</s>"				,	UpperCAmelCase_="<unk>"				,	UpperCAmelCase_="<sep>"				,	UpperCAmelCase_="<pad>"				,	UpperCAmelCase_="<cls>"				,	UpperCAmelCase_="<mask>"				,	UpperCAmelCase_=["<eop>", "<eod>"]				,	UpperCAmelCase_ = None				,	**UpperCAmelCase_				,	):
								# Mask token behave like a normal word, i.e. include the space before it
								lowerCamelCase			=AddedToken(UpperCAmelCase_				,	lstrip=UpperCAmelCase_				,	rstrip=UpperCAmelCase_							) if isinstance(UpperCAmelCase_				,	UpperCAmelCase_							) else mask_token

								lowerCamelCase			={} if sp_model_kwargs is None else sp_model_kwargs

								super().__init__(
								    do_lower_case=UpperCAmelCase_				,	remove_space=UpperCAmelCase_				,	keep_accents=UpperCAmelCase_				,	bos_token=UpperCAmelCase_				,	eos_token=UpperCAmelCase_				,	unk_token=UpperCAmelCase_				,	sep_token=UpperCAmelCase_				,	pad_token=UpperCAmelCase_				,	cls_token=UpperCAmelCase_				,	mask_token=UpperCAmelCase_				,	additional_special_tokens=UpperCAmelCase_				,	sp_model_kwargs=self.sp_model_kwargs				,	**UpperCAmelCase_				,	)

								lowerCamelCase			=3

								lowerCamelCase			=do_lower_case
								lowerCamelCase			=remove_space
								lowerCamelCase			=keep_accents
								lowerCamelCase			=vocab_file

								lowerCamelCase			=spm.SentencePieceProcessor(**self.sp_model_kwargs							)
								self.sp_model.Load(UpperCAmelCase_							)


				@property
				def _snake_case    (						self							):
								return len(self.sp_model							)


				def _snake_case    (						self							):
								lowerCamelCase			={self.convert_ids_to_tokens(UpperCAmelCase_							): i for i in range(self.vocab_size							)}
								vocab.update(self.added_tokens_encoder							)
								return vocab


				def __getstate__(						self							):
								lowerCamelCase			=self.__dict__.copy()
								lowerCamelCase			=None
								return state


				def __setstate__(						self				,	UpperCAmelCase_							):
								lowerCamelCase			=d

								# for backward compatibility
								if not hasattr(self				,	"""sp_model_kwargs"""							):
												lowerCamelCase			={}

								lowerCamelCase			=spm.SentencePieceProcessor(**self.sp_model_kwargs							)
								self.sp_model.Load(self.vocab_file							)


				def _snake_case    (						self				,	UpperCAmelCase_							):
								if self.remove_space:
												lowerCamelCase			=""" """.join(inputs.strip().split()							)
								else:
												lowerCamelCase			=inputs
								lowerCamelCase			=outputs.replace("""``"""				,	"""\""""							).replace("""''"""				,	"""\""""							)

								if not self.keep_accents:
												lowerCamelCase			=unicodedata.normalize("""NFKD"""				,	UpperCAmelCase_							)
												lowerCamelCase			="""""".join([c for c in outputs if not unicodedata.combining(UpperCAmelCase_							)]							)
								if self.do_lower_case:
												lowerCamelCase			=outputs.lower()

								return outputs


				def _snake_case    (						self				,	UpperCAmelCase_							):
								lowerCamelCase			=self.preprocess_text(UpperCAmelCase_							)
								lowerCamelCase			=self.sp_model.encode(UpperCAmelCase_				,	out_type=UpperCAmelCase_							)
								lowerCamelCase			=[]
								for piece in pieces:
												if len(UpperCAmelCase_							) > 1 and piece[-1] == str(""","""							) and piece[-2].isdigit():
																lowerCamelCase			=self.sp_model.EncodeAsPieces(piece[:-1].replace(UpperCAmelCase_				,	""""""							)							)
																if piece[0] != SPIECE_UNDERLINE and cur_pieces[0][0] == SPIECE_UNDERLINE:
																				if len(cur_pieces[0]							) == 1:
																								lowerCamelCase			=cur_pieces[1:]
																				else:
																								lowerCamelCase			=cur_pieces[0][1:]
																cur_pieces.append(piece[-1]							)
																new_pieces.extend(UpperCAmelCase_							)
												else:
																new_pieces.append(UpperCAmelCase_							)

								return new_pieces


				def _snake_case    (						self				,	UpperCAmelCase_							):
								return self.sp_model.PieceToId(UpperCAmelCase_							)


				def _snake_case    (						self				,	UpperCAmelCase_							):
								return self.sp_model.IdToPiece(UpperCAmelCase_							)


				def _snake_case    (						self				,	UpperCAmelCase_							):
								lowerCamelCase			="""""".join(UpperCAmelCase_							).replace(UpperCAmelCase_				,	""" """							).strip()
								return out_string


				def _snake_case    (						self				,	UpperCAmelCase_				,	UpperCAmelCase_ = False				,	UpperCAmelCase_ = None				,	UpperCAmelCase_ = True				,	**UpperCAmelCase_				,	):
								lowerCamelCase			=kwargs.pop("""use_source_tokenizer"""				,	UpperCAmelCase_							)

								lowerCamelCase			=self.convert_ids_to_tokens(UpperCAmelCase_				,	skip_special_tokens=UpperCAmelCase_							)

								# To avoid mixing byte-level and unicode for byte-level BPT
								# we need to build string separately for added tokens and byte-level tokens
								# cf. https://github.com/huggingface/transformers/issues/1133
								lowerCamelCase			=[]
								lowerCamelCase			=[]
								for token in filtered_tokens:
												if skip_special_tokens and token in self.all_special_ids:
																continue
												if token in self.added_tokens_encoder:
																if current_sub_text:
																				sub_texts.append(self.convert_tokens_to_string(UpperCAmelCase_							)							)
																				lowerCamelCase			=[]
																sub_texts.append(UpperCAmelCase_							)
												else:
																current_sub_text.append(UpperCAmelCase_							)
								if current_sub_text:
												sub_texts.append(self.convert_tokens_to_string(UpperCAmelCase_							)							)

								# Mimic the behavior of the Rust tokenizer:
								# By default, there are no spaces between special tokens
								lowerCamelCase			="""""".join(UpperCAmelCase_							)

								lowerCamelCase			=(
								    clean_up_tokenization_spaces
								    if clean_up_tokenization_spaces is not None
								    else self.clean_up_tokenization_spaces
								)
								if clean_up_tokenization_spaces:
												lowerCamelCase			=self.clean_up_tokenization(UpperCAmelCase_							)
												return clean_text
								else:
												return text


				def _snake_case    (						self				,	UpperCAmelCase_				,	UpperCAmelCase_ = None							):
								lowerCamelCase			=[self.sep_token_id]
								lowerCamelCase			=[self.cls_token_id]
								if token_ids_a is None:
												return token_ids_a + sep + cls
								return token_ids_a + sep + token_ids_a + sep + cls


				def _snake_case    (						self				,	UpperCAmelCase_				,	UpperCAmelCase_ = None				,	UpperCAmelCase_ = False							):

								if already_has_special_tokens:
												return super().get_special_tokens_mask(
												    token_ids_a=UpperCAmelCase_				,	token_ids_a=UpperCAmelCase_				,	already_has_special_tokens=UpperCAmelCase_							)

								if token_ids_a is not None:
												return ([0] * len(UpperCAmelCase_							)) + [1] + ([0] * len(UpperCAmelCase_							)) + [1, 1]
								return ([0] * len(UpperCAmelCase_							)) + [1, 1]


				def _snake_case    (						self				,	UpperCAmelCase_				,	UpperCAmelCase_ = None							):
								lowerCamelCase			=[self.sep_token_id]
								lowerCamelCase			=[2]

								if token_ids_a is None:
												return len(token_ids_a + sep							) * [0] + cls_segment_id
								return len(token_ids_a + sep							) * [0] + len(token_ids_a + sep							) * [1] + cls_segment_id


				def _snake_case    (						self				,	UpperCAmelCase_				,	UpperCAmelCase_ = None							):
								if not os.path.isdir(UpperCAmelCase_							):
												logger.error(f"""Vocabulary path ({save_directory}) should be a directory"""							)
												return
								lowerCamelCase			=os.path.join(
								    UpperCAmelCase_				,	(filename_prefix + """-""" if filename_prefix else """""") + VOCAB_FILES_NAMES["""vocab_file"""]							)

								if os.path.abspath(self.vocab_file							) != os.path.abspath(UpperCAmelCase_							) and os.path.isfile(self.vocab_file							):
												copyfile(self.vocab_file				,	UpperCAmelCase_							)
								elif not os.path.isfile(self.vocab_file							):
												with open(UpperCAmelCase_				,	"""wb"""							) as fi:
																lowerCamelCase			=self.sp_model.serialized_model_proto()
																fi.write(UpperCAmelCase_							)

								return (out_vocab_file,)





