


'''simple docstring'''






import unittest

from transformers import FunnelConfig, FunnelTokenizer, is_torch_available
from transformers.models.auto import get_values
from transformers.testing_utils import require_sentencepiece, require_tokenizers, require_torch, slow, torch_device

from ...test_configuration_common import ConfigTester
from ...test_modeling_common import ModelTesterMixin, ids_tensor
from ...test_pipeline_mixin import PipelineTesterMixin


if is_torch_available():
		import torch

		from transformers import (
		    MODEL_FOR_PRETRAINING_MAPPING,
		    FunnelBaseModel,
		    FunnelForMaskedLM,
		    FunnelForMultipleChoice,
		    FunnelForPreTraining,
		    FunnelForQuestionAnswering,
		    FunnelForSequenceClassification,
		    FunnelForTokenClassification,
		    FunnelModel,
		)




class 		a__				:





							'''simple docstring'''






							def __init__(		self					,    lowerCamelCase_					,    lowerCamelCase_=13					,    lowerCamelCase_=7					,    lowerCamelCase_=True					,    lowerCamelCase_=True					,    lowerCamelCase_=True					,    lowerCamelCase_=True					,    lowerCamelCase_=99					,    lowerCamelCase_=[1, 1, 2]					,    lowerCamelCase_=1					,    lowerCamelCase_=32					,    lowerCamelCase_=4					,    lowerCamelCase_=8					,    lowerCamelCase_=37					,    lowerCamelCase_="gelu_new"					,    lowerCamelCase_=0.1					,    lowerCamelCase_=0.1					,    lowerCamelCase_=0.0					,    lowerCamelCase_=5_12					,    lowerCamelCase_=3					,    lowerCamelCase_=0.02					,    lowerCamelCase_=3					,    lowerCamelCase_=4					,    lowerCamelCase_=None					,    lowerCamelCase_=False					,    )       ->							Tuple:
														lowerCAmelCase__          =	parent
														lowerCAmelCase__          =	batch_size
														lowerCAmelCase__          =	seq_length
														lowerCAmelCase__          =	is_training
														lowerCAmelCase__          =	use_input_mask
														lowerCAmelCase__          =	use_token_type_ids
														lowerCAmelCase__          =	use_labels
														lowerCAmelCase__          =	vocab_size
														lowerCAmelCase__          =	block_sizes
														lowerCAmelCase__          =	num_decoder_layers
														lowerCAmelCase__          =	d_model
														lowerCAmelCase__          =	n_head
														lowerCAmelCase__          =	d_head
														lowerCAmelCase__          =	d_inner
														lowerCAmelCase__          =	hidden_act
														lowerCAmelCase__          =	hidden_dropout
														lowerCAmelCase__          =	attention_dropout
														lowerCAmelCase__          =	activation_dropout
														lowerCAmelCase__          =	max_position_embeddings
														lowerCAmelCase__          =	type_vocab_size
														lowerCAmelCase__          =	2
														lowerCAmelCase__          =	num_labels
														lowerCAmelCase__          =	num_choices
														lowerCAmelCase__          =	scope
														lowerCAmelCase__          =	initializer_std

														# Used in the tests to check the size of the first attention layer
														lowerCAmelCase__          =	n_head
														# Used in the tests to check the size of the first hidden state
														lowerCAmelCase__          =	self.d_model
														# Used in the tests to check the number of output hidden states/attentions
														lowerCAmelCase__          =	sum(self.block_sizes   ) + (0 if base else self.num_decoder_layers)
														# FunnelModel adds two hidden layers: input embeddings and the sum of the upsampled encoder hidden state with
														# the last hidden state of the first block (which is the first hidden state of the decoder).
														if not base:
																					lowerCAmelCase__          =	self.num_hidden_layers + 2







							def   __SCREAMING_SNAKE_CASE							(		self   )       ->							Optional[Any]:
														lowerCAmelCase__          =	ids_tensor([self.batch_size, self.seq_length]					,    self.vocab_size   )

														lowerCAmelCase__          =	None
														if self.use_input_mask:
																					lowerCAmelCase__          =	ids_tensor([self.batch_size, self.seq_length]					,    vocab_size=2   )

														lowerCAmelCase__          =	None
														if self.use_token_type_ids:
																					lowerCAmelCase__          =	ids_tensor([self.batch_size, self.seq_length]					,    self.type_vocab_size   )

														lowerCAmelCase__          =	None
														lowerCAmelCase__          =	None
														lowerCAmelCase__          =	None
														if self.use_labels:
																					lowerCAmelCase__          =	ids_tensor([self.batch_size]					,    self.type_sequence_label_size   )
																					lowerCAmelCase__          =	ids_tensor([self.batch_size, self.seq_length]					,    self.num_labels   )
																					lowerCAmelCase__          =	ids_tensor([self.batch_size]					,    self.num_choices   )
																					lowerCAmelCase__          =	ids_tensor([self.batch_size, self.seq_length]					,    1   )

														lowerCAmelCase__          =	self.get_config()

														return (
														    config,
														    input_ids,
														    token_type_ids,
														    input_mask,
														    sequence_labels,
														    token_labels,
														    choice_labels,
														    fake_token_labels,
														)







							def   __SCREAMING_SNAKE_CASE							(		self   )       ->							Tuple:
														return FunnelConfig(
														    vocab_size=self.vocab_size					,    block_sizes=self.block_sizes					,    num_decoder_layers=self.num_decoder_layers					,    d_model=self.d_model					,    n_head=self.n_head					,    d_head=self.d_head					,    d_inner=self.d_inner					,    hidden_act=self.hidden_act					,    hidden_dropout=self.hidden_dropout					,    attention_dropout=self.attention_dropout					,    activation_dropout=self.activation_dropout					,    max_position_embeddings=self.max_position_embeddings					,    type_vocab_size=self.type_vocab_size					,    initializer_std=self.initializer_std					,    )







							def   __SCREAMING_SNAKE_CASE							(		self					,    lowerCamelCase_					,    lowerCamelCase_					,    lowerCamelCase_					,    lowerCamelCase_					,    lowerCamelCase_					,    lowerCamelCase_					,    lowerCamelCase_					,    lowerCamelCase_					,    )       ->							Dict:
														lowerCAmelCase__          =	FunnelModel(config=lowerCamelCase_   )
														model.to(lowerCamelCase_   )
														model.eval()
														lowerCAmelCase__          =	model(lowerCamelCase_					,    attention_mask=lowerCamelCase_					,    token_type_ids=lowerCamelCase_   )
														lowerCAmelCase__          =	model(lowerCamelCase_					,    token_type_ids=lowerCamelCase_   )
														lowerCAmelCase__          =	model(lowerCamelCase_   )
														self.parent.assertEqual(result.last_hidden_state.shape					,    (self.batch_size, self.seq_length, self.d_model)   )

														lowerCAmelCase__          =	False
														lowerCAmelCase__          =	model(lowerCamelCase_   )
														self.parent.assertEqual(result.last_hidden_state.shape					,    (self.batch_size, self.seq_length, self.d_model)   )

														lowerCAmelCase__          =	False
														lowerCAmelCase__          =	model(lowerCamelCase_   )
														self.parent.assertEqual(result.last_hidden_state.shape					,    (self.batch_size, self.seq_length, self.d_model)   )







							def   __SCREAMING_SNAKE_CASE							(		self					,    lowerCamelCase_					,    lowerCamelCase_					,    lowerCamelCase_					,    lowerCamelCase_					,    lowerCamelCase_					,    lowerCamelCase_					,    lowerCamelCase_					,    lowerCamelCase_					,    )       ->							Optional[Any]:
														lowerCAmelCase__          =	FunnelBaseModel(config=lowerCamelCase_   )
														model.to(lowerCamelCase_   )
														model.eval()
														lowerCAmelCase__          =	model(lowerCamelCase_					,    attention_mask=lowerCamelCase_					,    token_type_ids=lowerCamelCase_   )
														lowerCAmelCase__          =	model(lowerCamelCase_					,    token_type_ids=lowerCamelCase_   )
														lowerCAmelCase__          =	model(lowerCamelCase_   )
														self.parent.assertEqual(result.last_hidden_state.shape					,    (self.batch_size, 2, self.d_model)   )

														lowerCAmelCase__          =	False
														lowerCAmelCase__          =	model(lowerCamelCase_   )
														self.parent.assertEqual(result.last_hidden_state.shape					,    (self.batch_size, 3, self.d_model)   )

														lowerCAmelCase__          =	False
														lowerCAmelCase__          =	model(lowerCamelCase_   )
														self.parent.assertEqual(result.last_hidden_state.shape					,    (self.batch_size, 2, self.d_model)   )







							def   __SCREAMING_SNAKE_CASE							(		self					,    lowerCamelCase_					,    lowerCamelCase_					,    lowerCamelCase_					,    lowerCamelCase_					,    lowerCamelCase_					,    lowerCamelCase_					,    lowerCamelCase_					,    lowerCamelCase_					,    )       ->							Optional[Any]:
														lowerCAmelCase__          =	self.num_labels
														lowerCAmelCase__          =	FunnelForPreTraining(config=lowerCamelCase_   )
														model.to(lowerCamelCase_   )
														model.eval()
														lowerCAmelCase__          =	model(lowerCamelCase_					,    attention_mask=lowerCamelCase_					,    token_type_ids=lowerCamelCase_					,    labels=lowerCamelCase_   )
														self.parent.assertEqual(result.logits.shape					,    (self.batch_size, self.seq_length)   )







							def   __SCREAMING_SNAKE_CASE							(		self					,    lowerCamelCase_					,    lowerCamelCase_					,    lowerCamelCase_					,    lowerCamelCase_					,    lowerCamelCase_					,    lowerCamelCase_					,    lowerCamelCase_					,    lowerCamelCase_					,    )       ->							Dict:
														lowerCAmelCase__          =	FunnelForMaskedLM(config=lowerCamelCase_   )
														model.to(lowerCamelCase_   )
														model.eval()
														lowerCAmelCase__          =	model(lowerCamelCase_					,    attention_mask=lowerCamelCase_					,    token_type_ids=lowerCamelCase_					,    labels=lowerCamelCase_   )
														self.parent.assertEqual(result.logits.shape					,    (self.batch_size, self.seq_length, self.vocab_size)   )







							def   __SCREAMING_SNAKE_CASE							(		self					,    lowerCamelCase_					,    lowerCamelCase_					,    lowerCamelCase_					,    lowerCamelCase_					,    lowerCamelCase_					,    lowerCamelCase_					,    lowerCamelCase_					,    lowerCamelCase_					,    )       ->							Dict:
														lowerCAmelCase__          =	self.num_labels
														lowerCAmelCase__          =	FunnelForSequenceClassification(lowerCamelCase_   )
														model.to(lowerCamelCase_   )
														model.eval()
														lowerCAmelCase__          =	model(lowerCamelCase_					,    attention_mask=lowerCamelCase_					,    token_type_ids=lowerCamelCase_					,    labels=lowerCamelCase_   )
														self.parent.assertEqual(result.logits.shape					,    (self.batch_size, self.num_labels)   )







							def   __SCREAMING_SNAKE_CASE							(		self					,    lowerCamelCase_					,    lowerCamelCase_					,    lowerCamelCase_					,    lowerCamelCase_					,    lowerCamelCase_					,    lowerCamelCase_					,    lowerCamelCase_					,    lowerCamelCase_					,    )       ->							Optional[Any]:
														lowerCAmelCase__          =	self.num_choices
														lowerCAmelCase__          =	FunnelForMultipleChoice(config=lowerCamelCase_   )
														model.to(lowerCamelCase_   )
														model.eval()
														lowerCAmelCase__          =	input_ids.unsqueeze(1   ).expand(-1					,    self.num_choices					,    -1   ).contiguous()
														lowerCAmelCase__          =	token_type_ids.unsqueeze(1   ).expand(-1					,    self.num_choices					,    -1   ).contiguous()
														lowerCAmelCase__          =	input_mask.unsqueeze(1   ).expand(-1					,    self.num_choices					,    -1   ).contiguous()
														lowerCAmelCase__          =	model(
														    lowerCamelCase_					,    attention_mask=lowerCamelCase_					,    token_type_ids=lowerCamelCase_					,    labels=lowerCamelCase_					,    )
														self.parent.assertEqual(result.logits.shape					,    (self.batch_size, self.num_choices)   )







							def   __SCREAMING_SNAKE_CASE							(		self					,    lowerCamelCase_					,    lowerCamelCase_					,    lowerCamelCase_					,    lowerCamelCase_					,    lowerCamelCase_					,    lowerCamelCase_					,    lowerCamelCase_					,    lowerCamelCase_					,    )       ->							Union[str, Any]:
														lowerCAmelCase__          =	self.num_labels
														lowerCAmelCase__          =	FunnelForTokenClassification(config=lowerCamelCase_   )
														model.to(lowerCamelCase_   )
														model.eval()
														lowerCAmelCase__          =	model(lowerCamelCase_					,    attention_mask=lowerCamelCase_					,    token_type_ids=lowerCamelCase_					,    labels=lowerCamelCase_   )
														self.parent.assertEqual(result.logits.shape					,    (self.batch_size, self.seq_length, self.num_labels)   )







							def   __SCREAMING_SNAKE_CASE							(		self					,    lowerCamelCase_					,    lowerCamelCase_					,    lowerCamelCase_					,    lowerCamelCase_					,    lowerCamelCase_					,    lowerCamelCase_					,    lowerCamelCase_					,    lowerCamelCase_					,    )       ->							str:
														lowerCAmelCase__          =	FunnelForQuestionAnswering(config=lowerCamelCase_   )
														model.to(lowerCamelCase_   )
														model.eval()
														lowerCAmelCase__          =	model(
														    lowerCamelCase_					,    attention_mask=lowerCamelCase_					,    token_type_ids=lowerCamelCase_					,    start_positions=lowerCamelCase_					,    end_positions=lowerCamelCase_					,    )
														self.parent.assertEqual(result.start_logits.shape					,    (self.batch_size, self.seq_length)   )
														self.parent.assertEqual(result.end_logits.shape					,    (self.batch_size, self.seq_length)   )







							def   __SCREAMING_SNAKE_CASE							(		self   )       ->							List[Any]:
														lowerCAmelCase__          =	self.prepare_config_and_inputs()
														(
														    (
														    lowerCAmelCase__
														)   ,					(
														    lowerCAmelCase__
														)   ,					(
														    lowerCAmelCase__
														)   ,					(
														    lowerCAmelCase__
														)   ,					(
														    lowerCAmelCase__
														)   ,					(
														    lowerCAmelCase__
														)   ,					(
														    lowerCAmelCase__
														)   ,					(
														    lowerCAmelCase__
														)   ,					
														)          =	config_and_inputs
														lowerCAmelCase__          =	{'''input_ids''': input_ids, '''token_type_ids''': token_type_ids, '''attention_mask''': input_mask}
														return config, inputs_dict




@require_torch
class 		a__				(							a__				,				a__				,				unittest.TestCase  ):





							'''simple docstring'''






							lowercase__			:   Union[str, Any]							=      False
							lowercase__			:   List[str]							=      False
							lowercase__			:   int							=      (
							    (
							        FunnelModel,
							        FunnelForMaskedLM,
							        FunnelForPreTraining,
							        FunnelForQuestionAnswering,
							        FunnelForTokenClassification,
							    )
							    if is_torch_available()
							    else ()
							)
							lowercase__			:   str							=      (
							    {
							        "feature-extraction": (FunnelBaseModel, FunnelModel),
							        "fill-mask": FunnelForMaskedLM,
							        "question-answering": FunnelForQuestionAnswering,
							        "text-classification": FunnelForSequenceClassification,
							        "token-classification": FunnelForTokenClassification,
							        "zero-shot": FunnelForSequenceClassification,
							    }
							    if is_torch_available()
							    else {}
							)







							def   __SCREAMING_SNAKE_CASE							(		self					,    lowerCamelCase_					,    lowerCamelCase_					,    lowerCamelCase_=False   )       ->							Any:
														lowerCAmelCase__          =	super()._prepare_for_class(lowerCamelCase_					,    lowerCamelCase_					,    return_labels=lowerCamelCase_   )

														if return_labels:
																					if model_class in get_values(lowerCamelCase_   ):
																												lowerCAmelCase__          =	torch.zeros(
																												    (self.model_tester.batch_size, self.model_tester.seq_length)					,    dtype=torch.long					,    device=lowerCamelCase_   )
														return inputs_dict







							def   __SCREAMING_SNAKE_CASE							(		self   )       ->							Dict:
														lowerCAmelCase__          =	FunnelModelTester(self   )
														lowerCAmelCase__          =	ConfigTester(self					,    config_class=lowerCamelCase_   )







							def   __SCREAMING_SNAKE_CASE							(		self   )       ->							Union[str, Any]:
														self.config_tester.run_common_tests()







							def   __SCREAMING_SNAKE_CASE							(		self   )       ->							str:
														lowerCAmelCase__          =	self.model_tester.prepare_config_and_inputs()
														self.model_tester.create_and_check_model(*lowerCamelCase_   )







							def   __SCREAMING_SNAKE_CASE							(		self   )       ->							Dict:
														lowerCAmelCase__          =	self.model_tester.prepare_config_and_inputs()
														self.model_tester.create_and_check_for_pretraining(*lowerCamelCase_   )







							def   __SCREAMING_SNAKE_CASE							(		self   )       ->							str:
														lowerCAmelCase__          =	self.model_tester.prepare_config_and_inputs()
														self.model_tester.create_and_check_for_masked_lm(*lowerCamelCase_   )







							def   __SCREAMING_SNAKE_CASE							(		self   )       ->							Dict:
														lowerCAmelCase__          =	self.model_tester.prepare_config_and_inputs()
														self.model_tester.create_and_check_for_token_classification(*lowerCamelCase_   )







							def   __SCREAMING_SNAKE_CASE							(		self   )       ->							Tuple:
														lowerCAmelCase__          =	self.model_tester.prepare_config_and_inputs()
														self.model_tester.create_and_check_for_question_answering(*lowerCamelCase_   )







							def   __SCREAMING_SNAKE_CASE							(		self					,    lowerCamelCase_   )       ->							List[str]:
														if hasattr(lowerCamelCase_					,    '''weight'''   ) and module.weight is not None:
																					module.weight.data.fill_(3   )
														if hasattr(lowerCamelCase_					,    '''bias'''   ) and module.bias is not None:
																					module.bias.data.fill_(3   )

														for param in ["r_w_bias", "r_r_bias", "r_kernel", "r_s_bias", "seg_embed"]:
																					if hasattr(lowerCamelCase_					,    lowerCamelCase_   ) and getattr(lowerCamelCase_					,    lowerCamelCase_   ) is not None:
																												lowerCAmelCase__          =	getattr(lowerCamelCase_					,    lowerCamelCase_   )
																												weight.data.fill_(3   )




@require_torch
class 		a__				(							a__				,				unittest.TestCase  ):





							'''simple docstring'''






							lowercase__			:   Dict							=      False
							lowercase__			:   Tuple							=      False
							lowercase__			:   Dict							=      (
							    (FunnelBaseModel, FunnelForMultipleChoice, FunnelForSequenceClassification) if is_torch_available() else ()
							)







							def   __SCREAMING_SNAKE_CASE							(		self   )       ->							Union[str, Any]:
														lowerCAmelCase__          =	FunnelModelTester(self					,    base=lowerCamelCase_   )
														lowerCAmelCase__          =	ConfigTester(self					,    config_class=lowerCamelCase_   )







							def   __SCREAMING_SNAKE_CASE							(		self   )       ->							List[Any]:
														self.config_tester.run_common_tests()







							def   __SCREAMING_SNAKE_CASE							(		self   )       ->							Tuple:
														lowerCAmelCase__          =	self.model_tester.prepare_config_and_inputs()
														self.model_tester.create_and_check_base_model(*lowerCamelCase_   )







							def   __SCREAMING_SNAKE_CASE							(		self   )       ->							int:
														lowerCAmelCase__          =	self.model_tester.prepare_config_and_inputs()
														self.model_tester.create_and_check_for_sequence_classification(*lowerCamelCase_   )







							def   __SCREAMING_SNAKE_CASE							(		self   )       ->							int:
														lowerCAmelCase__          =	self.model_tester.prepare_config_and_inputs()
														self.model_tester.create_and_check_for_multiple_choice(*lowerCamelCase_   )







							def   __SCREAMING_SNAKE_CASE							(		self   )       ->							List[Any]:
														lowerCAmelCase__   ,					lowerCAmelCase__          =	self.model_tester.prepare_config_and_inputs_for_common()
														lowerCAmelCase__          =	True

														for model_class in self.all_model_classes:
																					if model_class.__name__ == "FunnelBaseModel":
																												continue
																					lowerCAmelCase__          =	model_class(lowerCamelCase_   )
																					model.to(lowerCamelCase_   )
																					model.train()
																					lowerCAmelCase__          =	self._prepare_for_class(lowerCamelCase_					,    lowerCamelCase_					,    return_labels=lowerCamelCase_   )
																					lowerCAmelCase__          =	model(**lowerCamelCase_   ).loss
																					loss.backward()







							def   __SCREAMING_SNAKE_CASE							(		self					,    lowerCamelCase_   )       ->							List[str]:
														if hasattr(lowerCamelCase_					,    '''weight'''   ) and module.weight is not None:
																					module.weight.data.fill_(3   )
														if hasattr(lowerCamelCase_					,    '''bias'''   ) and module.bias is not None:
																					module.bias.data.fill_(3   )

														for param in ["r_w_bias", "r_r_bias", "r_kernel", "r_s_bias", "seg_embed"]:
																					if hasattr(lowerCamelCase_					,    lowerCamelCase_   ) and getattr(lowerCamelCase_					,    lowerCamelCase_   ) is not None:
																												lowerCAmelCase__          =	getattr(lowerCamelCase_					,    lowerCamelCase_   )
																												weight.data.fill_(3   )




@require_torch
@require_sentencepiece
@require_tokenizers
class 		a__				(							unittest.TestCase  ):





							'''simple docstring'''






							def   __SCREAMING_SNAKE_CASE							(		self   )       ->							Union[str, Any]:
														lowerCAmelCase__          =	13
														lowerCAmelCase__          =	7
														lowerCAmelCase__          =	torch.arange(0					,    batch_size * sequence_length   ).long().reshape(lowerCamelCase_					,    lowerCamelCase_   )
														lowerCAmelCase__          =	[0, 1, 2, 3, 4, 5, 6, 4, 1, 3, 5, 0, 1]
														lowerCAmelCase__          =	torch.tensor([[2] + [0] * a + [1] * (sequence_length - a - 1) for a in lengths]   )

														lowerCAmelCase__          =	FunnelModel.from_pretrained('''sgugger/funnel-random-tiny'''   )
														lowerCAmelCase__          =	model(lowerCamelCase_					,    token_type_ids=lowerCamelCase_   )[0].abs()

														lowerCAmelCase__          =	torch.tensor(2_344.8_352   )
														lowerCAmelCase__          =	torch.tensor(0.8_052   )
														self.assertTrue(torch.allclose(output.sum()					,    lowerCamelCase_					,    atol=1e-4   )   )
														self.assertTrue(torch.allclose(output.mean()					,    lowerCamelCase_					,    atol=1e-4   )   )

														lowerCAmelCase__          =	torch.tensor([[1] * 7, [1] * 4 + [0] * 3] * 6 + [[0, 1, 1, 0, 0, 1, 1]]   )
														lowerCAmelCase__          =	model(lowerCamelCase_					,    attention_mask=lowerCamelCase_					,    token_type_ids=lowerCamelCase_   )[0].abs()

														lowerCAmelCase__          =	torch.tensor(2_343.8_425   )
														lowerCAmelCase__          =	torch.tensor(0.8_049   )
														self.assertTrue(torch.allclose(output.sum()					,    lowerCamelCase_					,    atol=1e-4   )   )
														self.assertTrue(torch.allclose(output.mean()					,    lowerCamelCase_					,    atol=1e-4   )   )







							@slow
							def   __SCREAMING_SNAKE_CASE							(		self   )       ->							Dict:
														lowerCAmelCase__          =	FunnelTokenizer.from_pretrained('''huggingface/funnel-small'''   )
														lowerCAmelCase__          =	FunnelModel.from_pretrained('''huggingface/funnel-small'''   )
														lowerCAmelCase__          =	tokenizer('''Hello! I am the Funnel Transformer model.'''					,    return_tensors='''pt'''   )
														lowerCAmelCase__          =	model(**lowerCamelCase_   )[0]

														lowerCAmelCase__          =	torch.tensor(235.7_246   )
														lowerCAmelCase__          =	torch.tensor(0.0_256   )
														self.assertTrue(torch.allclose(output.sum()					,    lowerCamelCase_					,    atol=1e-4   )   )
														self.assertTrue(torch.allclose(output.mean()					,    lowerCamelCase_					,    atol=1e-4   )   )



'''simple docstring'''






import warnings

from ...utils import logging
from .image_processing_mobilenet_va import MobileNetVaImageProcessor


__UpperCAmelCase    				=							logging.get_logger(__name__)




class 		a__				(							a__  ):





							'''simple docstring'''






							def __init__(		self					,    *lowerCamelCase_					,    **lowerCamelCase_   )       ->							None:
														warnings.warn(
														    '''The class MobileNetV2FeatureExtractor is deprecated and will be removed in version 5 of Transformers.'''
														    ''' Please use MobileNetV2ImageProcessor instead.'''					,    lowerCamelCase_					,    )
														super().__init__(*lowerCamelCase_					,    **lowerCamelCase_   )