






'''simple docstring'''
import unittest

from transformers import AutoTokenizer, FalconConfig, is_torch_available
from transformers.testing_utils import require_torch, slow, torch_device

from ...generation.test_utils import GenerationTesterMixin
from ...test_configuration_common import ConfigTester
from ...test_modeling_common import ModelTesterMixin, ids_tensor, random_attention_mask
from ...test_pipeline_mixin import PipelineTesterMixin


if is_torch_available():
 import torch

 from transformers import (
     FalconForCausalLM,
     FalconForQuestionAnswering,
     FalconForSequenceClassification,
     FalconForTokenClassification,
     FalconModel,
 )


class 							_UpperCAmelCase    :




    def __init__(      self	:							Dict	,  a	:							Optional[int]	,  a	:							List[str]=3	,  a	:							Dict=7	,  a	:							Dict=True	,  a	:							List[Any]=True	,  a	:							Union[str, Any]=False	,  a	:							str=True	,  a	:							Optional[int]=9_9	,  a	:							Tuple=3_2	,  a	:							List[Any]=5	,  a	:							List[str]=4	,  a	:							Dict=3_7	,  a	:							Dict="gelu"	,  a	:							Union[str, Any]=0.1	,  a	:							Optional[int]=0.1	,  a	:							List[str]=5_1_2	,  a	:							List[str]=1_6	,  a	:							Dict=2	,  a	:							str=0.02	,  a	:							Union[str, Any]=3	,  a	:							Optional[int]=4	,  a	:							List[Any]=None	,  ):






       '''simple docstring'''






       lowercase_						:     List[Any]							     =  parent
       lowercase_						:     List[str]							     =  batch_size
       lowercase_						:     str							     =  seq_length
       lowercase_						:     Union[str, Any]							     =  is_training
       lowercase_						:     List[Any]							     =  use_input_mask
       lowercase_						:     int							     =  use_token_type_ids
       lowercase_						:     Optional[int]							     =  use_labels
       lowercase_						:     int							     =  vocab_size
       lowercase_						:     Optional[Any]							     =  hidden_size
       lowercase_						:     Tuple							     =  num_hidden_layers
       lowercase_						:     Optional[int]							     =  num_attention_heads
       lowercase_						:     Dict							     =  intermediate_size
       lowercase_						:     Any							     =  hidden_act
       lowercase_						:     Optional[Any]							     =  hidden_dropout_prob
       lowercase_						:     List[str]							     =  attention_probs_dropout_prob
       lowercase_						:     List[str]							     =  max_position_embeddings
       lowercase_						:     Any							     =  type_vocab_size
       lowercase_						:     int							     =  type_sequence_label_size
       lowercase_						:     List[str]							     =  initializer_range
       lowercase_						:     int							     =  num_labels
       lowercase_						:     Union[str, Any]							     =  num_choices
       lowercase_						:     str							     =  scope




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






       '''simple docstring'''






       lowercase_						:     List[Any]							     =  ids_tensor([self.batch_size, self.seq_length]	,  self.vocab_size      )

       lowercase_						:     int							     =  None
       if self.use_input_mask:
          lowercase_						:     List[str]							     =  random_attention_mask([self.batch_size, self.seq_length]      )

       lowercase_						:     int							     =  None

       lowercase_						:     Dict							     =  None
       lowercase_						:     List[Any]							     =  None
       lowercase_						:     Tuple							     =  None
       if self.use_labels:
          lowercase_						:     Optional[Any]							     =  ids_tensor([self.batch_size]	,  self.type_sequence_label_size      )
          lowercase_						:     Any							     =  ids_tensor([self.batch_size, self.seq_length]	,  self.num_labels      )
          lowercase_						:     Tuple							     =  ids_tensor([self.batch_size]	,  self.num_choices      )

       lowercase_						:     Dict							     =  self.get_config()

       return config, input_ids, token_type_ids, input_mask, sequence_labels, token_labels, choice_labels




    def 					lowerCAmelCase__					(      self	:							Dict      ):






       '''simple docstring'''






       return FalconConfig(
           vocab_size=self.vocab_size	,  hidden_size=self.hidden_size	,  num_hidden_layers=self.num_hidden_layers	,  num_attention_heads=self.num_attention_heads	,  intermediate_size=self.intermediate_size	,  hidden_act=self.hidden_act	,  hidden_dropout_prob=self.hidden_dropout_prob	,  attention_probs_dropout_prob=self.attention_probs_dropout_prob	,  max_position_embeddings=self.max_position_embeddings	,  type_vocab_size=self.type_vocab_size	,  is_decoder=a	,  initializer_range=self.initializer_range	,  pad_token_id=1	,  new_decoder_architecture=a	,  )




    def 					lowerCAmelCase__					(      self	:							int	,  a	:							List[Any]	,  a	:							Any	,  a	:							str	,  a	:							Optional[Any]	,  a	:							List[str]	,  a	:							Any	,  a	:							str      ):






       '''simple docstring'''






       lowercase_						:     Union[str, Any]							     =  FalconModel(config=a      )
       model.to(a      )
       model.eval()
       lowercase_						:     Optional[int]							     =  model(a	,  attention_mask=a      )
       lowercase_						:     Dict							     =  model(a      )
       self.parent.assertEqual(result.last_hidden_state.shape	,  (self.batch_size, self.seq_length, self.hidden_size)      )




    def 					lowerCAmelCase__					(      self	:							List[Any]	,  a	:							Optional[int]	,  a	:							List[str]	,  a	:							Any	,  a	:							str	,  a	:							str	,  a	:							int	,  a	:							List[Any]	,  a	:							Tuple	,  a	:							Tuple	,  ):






       '''simple docstring'''






       lowercase_						:     List[str]							     =  True
       lowercase_						:     List[str]							     =  FalconModel(a      )
       model.to(a      )
       model.eval()
       lowercase_						:     str							     =  model(
           a	,  attention_mask=a	,  encoder_hidden_states=a	,  encoder_attention_mask=a	,  )
       lowercase_						:     Optional[Any]							     =  model(
           a	,  attention_mask=a	,  encoder_hidden_states=a	,  )
       lowercase_						:     Tuple							     =  model(a	,  attention_mask=a      )
       self.parent.assertEqual(result.last_hidden_state.shape	,  (self.batch_size, self.seq_length, self.hidden_size)      )




    def 					lowerCAmelCase__					(      self	:							List[str]	,  a	:							int	,  a	:							str	,  a	:							List[str]	,  a	:							Optional[Any]	,  a	:							Optional[int]	,  a	:							str	,  a	:							Optional[Any]	,  a	:							Tuple	,  a	:							Any	,  ):






       '''simple docstring'''






       lowercase_						:     Optional[Any]							     =  FalconForCausalLM(config=a      )
       model.to(a      )
       model.eval()
       lowercase_						:     Optional[Any]							     =  model(a	,  attention_mask=a	,  labels=a      )
       self.parent.assertEqual(result.logits.shape	,  (self.batch_size, self.seq_length, self.vocab_size)      )




    def 					lowerCAmelCase__					(      self	:							List[str]	,  a	:							Dict	,  a	:							List[Any]	,  a	:							Optional[Any]	,  a	:							Optional[int]	,  a	:							Union[str, Any]	,  a	:							Optional[int]	,  a	:							Dict	,  a	:							List[Any]	,  a	:							List[str]	,  ):






       '''simple docstring'''






       lowercase_						:     Optional[int]							     =  True
       lowercase_						:     Dict							     =  True
       lowercase_						:     Union[str, Any]							     =  FalconForCausalLM(config=a      )
       model.to(a      )
       model.eval()

       # first forward pass
       lowercase_						:     int							     =  model(
           a	,  attention_mask=a	,  encoder_hidden_states=a	,  encoder_attention_mask=a	,  use_cache=a	,  )
       lowercase_						:     Any							     =  outputs.past_key_values

       # create hypothetical multiple next token and extent to next_input_ids
       lowercase_						:     int							     =  ids_tensor((self.batch_size, 3)	,  config.vocab_size      )
       lowercase_						:     Any							     =  ids_tensor((self.batch_size, 3)	,  vocab_size=2      )

       # append to next input_ids and
       lowercase_						:     Optional[Any]							     =  torch.cat([input_ids, next_tokens]	,  dim=-1      )
       lowercase_						:     Optional[int]							     =  torch.cat([input_mask, next_mask]	,  dim=-1      )

       lowercase_						:     Any							     =  model(
           a	,  attention_mask=a	,  encoder_hidden_states=a	,  encoder_attention_mask=a	,  output_hidden_states=a	,  )["hidden_states"][0]
       lowercase_						:     str							     =  model(
           a	,  attention_mask=a	,  encoder_hidden_states=a	,  encoder_attention_mask=a	,  past_key_values=a	,  output_hidden_states=a	,  )["hidden_states"][0]

       # select random slice
       lowercase_						:     List[Any]							     =  ids_tensor((1,)	,  output_from_past.shape[-1]      ).item()
       lowercase_						:     Optional[int]							     =  output_from_no_past[:, -3:, random_slice_idx].detach()
       lowercase_						:     str							     =  output_from_past[:, :, random_slice_idx].detach()

       self.parent.assertTrue(output_from_past_slice.shape[1] == next_tokens.shape[1]      )

       # test that outputs are equal for slice
       self.parent.assertTrue(torch.allclose(a	,  a	,  atol=1e-3      )      )





    def 					lowerCAmelCase__					(      self	:							Any      ):






       '''simple docstring'''






       lowercase_						:     Any							     =  self.prepare_config_and_inputs()
       (
           (
           lowercase_
       )     ,		(
           lowercase_
       )     ,		(
           lowercase_
       )     ,		(
           lowercase_
       )     ,		(
           lowercase_
       )     ,		(
           lowercase_
       )     ,		(
           lowercase_
       )     ,		
       )						:     Dict							     =  config_and_inputs
       lowercase_						:     Tuple							     =  {"input_ids": input_ids, "attention_mask": input_mask}
       return config, inputs_dict


@require_torch
class 							_UpperCAmelCase    (		snake_case					,       snake_case					,       snake_case					,       unittest.TestCase      ):
    __lowerCamelCase: Tuple									=     (
        (
            FalconModel,
            FalconForCausalLM,
            FalconForSequenceClassification,
            FalconForTokenClassification,
            FalconForQuestionAnswering,
        )
        if is_torch_available()
        else ()
    )
    __lowerCamelCase: str									=     (FalconForCausalLM,) if is_torch_available() else ()
    __lowerCamelCase: List[str]									=     (
        {
            'feature-extraction': FalconModel,
            'text-classification': FalconForSequenceClassification,
            'text-generation': FalconForCausalLM,
            'question-answering': FalconForQuestionAnswering,
            'token-classification': FalconForTokenClassification,
            'zero-shot': FalconForSequenceClassification,
        }
        if is_torch_available()
        else {}
    )
    __lowerCamelCase: Optional[int]									=     False
    __lowerCamelCase: Optional[Any]									=     False




    def 					lowerCAmelCase__					(      self	:							Optional[Any]      ):






       '''simple docstring'''






       lowercase_						:     List[str]							     =  FalconModelTester(self      )
       lowercase_						:     Any							     =  ConfigTester(self	,  config_class=a	,  hidden_size=3_7      )




    def 					lowerCAmelCase__					(      self	:							int      ):






       '''simple docstring'''






       self.config_tester.run_common_tests()




    def 					lowerCAmelCase__					(      self	:							Dict      ):






       '''simple docstring'''






       lowercase_						:     Any							     =  self.model_tester.prepare_config_and_inputs()
       self.model_tester.create_and_check_model(*a      )




    def 					lowerCAmelCase__					(      self	:							str      ):






       '''simple docstring'''






       lowercase_     ,		*lowercase_						:     Union[str, Any]							     =  self.model_tester.prepare_config_and_inputs()
       for alibi in [True, False]:
          lowercase_						:     Optional[Any]							     =  alibi
          self.model_tester.create_and_check_model(a	,  *a      )




    def 					lowerCAmelCase__					(      self	:							Optional[Any]      ):






       '''simple docstring'''






       lowercase_     ,		lowercase_						:     Tuple							     =  self.model_tester.prepare_config_and_inputs_for_common()
       lowercase_						:     Any							     =  3
       lowercase_						:     int							     =  input_dict["input_ids"]
       lowercase_						:     Optional[int]							     =  input_ids.ne(1      ).to(a      )
       lowercase_						:     Tuple							     =  ids_tensor([self.model_tester.batch_size]	,  self.model_tester.type_sequence_label_size      )
       lowercase_						:     List[str]							     =  FalconForSequenceClassification(a      )
       model.to(a      )
       model.eval()
       lowercase_						:     Dict							     =  model(a	,  attention_mask=a	,  labels=a      )
       self.assertEqual(result.logits.shape	,  (self.model_tester.batch_size, self.model_tester.num_labels)      )




    def 					lowerCAmelCase__					(      self	:							int      ):






       '''simple docstring'''






       lowercase_     ,		lowercase_						:     Union[str, Any]							     =  self.model_tester.prepare_config_and_inputs_for_common()
       lowercase_						:     Dict							     =  3
       lowercase_						:     Dict							     =  "single_label_classification"
       lowercase_						:     Dict							     =  input_dict["input_ids"]
       lowercase_						:     Tuple							     =  input_ids.ne(1      ).to(a      )
       lowercase_						:     str							     =  ids_tensor([self.model_tester.batch_size]	,  self.model_tester.type_sequence_label_size      )
       lowercase_						:     int							     =  FalconForSequenceClassification(a      )
       model.to(a      )
       model.eval()
       lowercase_						:     List[Any]							     =  model(a	,  attention_mask=a	,  labels=a      )
       self.assertEqual(result.logits.shape	,  (self.model_tester.batch_size, self.model_tester.num_labels)      )




    def 					lowerCAmelCase__					(      self	:							Optional[Any]      ):






       '''simple docstring'''






       lowercase_     ,		lowercase_						:     str							     =  self.model_tester.prepare_config_and_inputs_for_common()
       lowercase_						:     Union[str, Any]							     =  input_dict["input_ids"]
       lowercase_						:     Dict							     =  FalconForCausalLM(a      )
       model.to(a      )
       model.eval()
       lowercase_						:     Dict							     =  model(a	,  use_cache=a      )
       lowercase_						:     Optional[Any]							     =  input_ids.shape[0]
       lowercase_						:     List[str]							     =  model._convert_to_rw_cache(result.past_key_values      )
       lowercase_						:     Union[str, Any]							     =  model._convert_cache_to_standard_format(a	,  a      )
       for layer in range(len(a      )      ):
          for tensor_idx in range(2      ):
             self.assertTrue(rw_cache[layer][tensor_idx].ndim == 3      )
             self.assertTrue(result.past_key_values[layer][tensor_idx].ndim == 4      )
             self.assertTrue(
                 torch.all(result.past_key_values[layer][tensor_idx] == standard_cache[layer][tensor_idx]      )      )




    def 					lowerCAmelCase__					(      self	:							Dict      ):






       '''simple docstring'''






       lowercase_     ,		lowercase_						:     Optional[Any]							     =  self.model_tester.prepare_config_and_inputs_for_common()
       lowercase_						:     Tuple							     =  3
       lowercase_						:     List[Any]							     =  "multi_label_classification"
       lowercase_						:     Dict							     =  input_dict["input_ids"]
       lowercase_						:     Tuple							     =  input_ids.ne(1      ).to(a      )
       lowercase_						:     List[Any]							     =  ids_tensor(
           [self.model_tester.batch_size, config.num_labels]	,  self.model_tester.type_sequence_label_size      ).to(torch.float      )
       lowercase_						:     Tuple							     =  FalconForSequenceClassification(a      )
       model.to(a      )
       model.eval()
       lowercase_						:     int							     =  model(a	,  attention_mask=a	,  labels=a      )
       self.assertEqual(result.logits.shape	,  (self.model_tester.batch_size, self.model_tester.num_labels)      )





    def 					lowerCAmelCase__					(      self	:							List[str]      ):






       '''simple docstring'''






       for model_class in self.all_generative_model_classes:
          lowercase_     ,		lowercase_						:     Optional[int]							     =  self.model_tester.prepare_config_and_inputs_for_common()

          # If it doesn't support cache, pass the test
          if not hasattr(a	,  "use_cache"      ):
             return

          lowercase_						:     Dict							     =  model_class(a      ).to(a      )
          if "use_cache" not in inputs:
             lowercase_						:     int							     =  True
          lowercase_						:     int							     =  model(**a      )

          # If "past_key_values" is not returned, pass the test (e.g. RWKV uses a different cache name and format)
          if "past_key_values" not in outputs:
             return

          lowercase_						:     List[str]							     =  (
              getattr(a	,  "decoder_layers"	,  a      )
              or getattr(a	,  "num_decoder_layers"	,  a      )
              or config.num_hidden_layers
          )
          lowercase_						:     List[str]							     =  getattr(a	,  "num_kv_heads"	,  config.num_attention_heads      )
          lowercase_						:     Dict							     =  getattr(a	,  "d_model"	,  config.hidden_size      )
          lowercase_						:     int							     =  embed_dim // num_attention_heads

          lowercase_						:     int							     =  outputs["past_key_values"]
          self.assertEqual(len(a      )	,  a      )

          lowercase_     ,		lowercase_						:     str							     =  inputs["input_ids"].shape
          for i in range(a      ):
             if config.new_decoder_architecture:
                lowercase_						:     Optional[int]							     =  config.num_attention_heads
             elif config.multi_query:
                lowercase_						:     Dict							     =  1
             self.assertEqual(len(past_kv[0]      )	,  2      )  # K V for the decoder = 2
             self.assertEqual(
                 past_kv[i][0].shape	,  (batch_size, num_attention_heads, seq_length, per_head_embed_dim)      )
             self.assertEqual(
                 past_kv[i][1].shape	,  (batch_size, num_attention_heads, seq_length, per_head_embed_dim)      )


@require_torch
class 							_UpperCAmelCase    (		unittest.TestCase      ):




    @slow
    def 					lowerCAmelCase__					(      self	:							Any      ):






       '''simple docstring'''






       lowercase_						:     Tuple							     =  AutoTokenizer.from_pretrained("Rocketknight1/falcon-rw-1b"      )
       lowercase_						:     Dict							     =  FalconForCausalLM.from_pretrained("Rocketknight1/falcon-rw-1b"      )
       model.eval()
       model.to(a      )
       lowercase_						:     Tuple							     =  tokenizer("My favorite food is"	,  return_tensors="pt"      ).to(a      )

       lowercase_						:     Tuple							     =  (
           "My favorite food is pizza. I love it so much that I have a pizza party every year for my birthday."
       )

       lowercase_						:     List[Any]							     =  model.generate(**a	,  do_sample=a	,  max_new_tokens=1_9      )
       lowercase_						:     List[Any]							     =  tokenizer.batch_decode(a      )[0]

       self.assertEqual(a	,  a      )




    @slow
    def 					lowerCAmelCase__					(      self	:							Any      ):






       '''simple docstring'''






       for repo in ["Rocketknight1/tiny-random-falcon-7b", "Rocketknight1/tiny-random-falcon-40b"]:
          lowercase_						:     Tuple							     =  AutoTokenizer.from_pretrained(a      )
          lowercase_						:     Dict							     =  FalconForCausalLM.from_pretrained(a      )
          model.eval()
          model.to(a      )
          lowercase_						:     Tuple							     =  tokenizer("My favorite food is"	,  return_tensors="pt"      ).to(a      )

          # We just test that these run without errors - the models are randomly initialized
          # and so the actual text outputs will be garbage
          model.generate(**a	,  do_sample=a	,  max_new_tokens=4      )
          model.generate(**a	,  do_sample=a	,  max_new_tokens=4      )
          model.generate(**a	,  num_beams=2	,  max_new_tokens=4      )





    @slow
    def 					lowerCAmelCase__					(      self	:							Tuple      ):






       '''simple docstring'''






       with torch.no_grad():
          for repo in [
              "Rocketknight1/falcon-rw-1b",
              "Rocketknight1/tiny-random-falcon-7b",
              "Rocketknight1/tiny-random-falcon-40b",
          ]:
             lowercase_						:     Any							     =  AutoTokenizer.from_pretrained(a      )
             lowercase_						:     List[Any]							     =  FalconForCausalLM.from_pretrained(a      )
             model.eval()
             model.to(device=a      )
             lowercase_						:     int							     =  tokenizer("My favorite food is"	,  return_tensors="pt"      ).to(a      )

             # Test results are the same with and without cache
             lowercase_						:     Tuple							     =  model.generate(**a	,  do_sample=a	,  max_new_tokens=2_0	,  use_cache=a      )
             lowercase_						:     Dict							     =  model.generate(**a	,  do_sample=a	,  max_new_tokens=2_0	,  use_cache=a      )
             self.assertTrue((outputs_cache - outputs_no_cache).sum().item() == 0      )












'''simple docstring'''
from typing import TYPE_CHECKING

from ...utils import (
    OptionalDependencyNotAvailable,
    _LazyModule,
    is_tf_available,
    is_tokenizers_available,
    is_torch_available,
    is_vision_available,
)


UpperCamelCase__			=      {
    'configuration_layoutlmv3': [
        'LAYOUTLMV3_PRETRAINED_CONFIG_ARCHIVE_MAP',
        'LayoutLMv3Config',
        'LayoutLMv3OnnxConfig',
    ],
    'processing_layoutlmv3': ['LayoutLMv3Processor'],
    'tokenization_layoutlmv3': ['LayoutLMv3Tokenizer'],
}

try:
 if not is_tokenizers_available():
  raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
 pass
else:
 UpperCamelCase__			=      ['LayoutLMv3TokenizerFast']

try:
 if not is_torch_available():
  raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
 pass
else:
 UpperCamelCase__			=      [
     'LAYOUTLMV3_PRETRAINED_MODEL_ARCHIVE_LIST',
     'LayoutLMv3ForQuestionAnswering',
     'LayoutLMv3ForSequenceClassification',
     'LayoutLMv3ForTokenClassification',
     'LayoutLMv3Model',
     'LayoutLMv3PreTrainedModel',
 ]

try:
 if not is_tf_available():
  raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
 pass
else:
 UpperCamelCase__			=      [
     'TF_LAYOUTLMV3_PRETRAINED_MODEL_ARCHIVE_LIST',
     'TFLayoutLMv3ForQuestionAnswering',
     'TFLayoutLMv3ForSequenceClassification',
     'TFLayoutLMv3ForTokenClassification',
     'TFLayoutLMv3Model',
     'TFLayoutLMv3PreTrainedModel',
 ]

try:
 if not is_vision_available():
  raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
 pass
else:
 UpperCamelCase__			=      ['LayoutLMv3FeatureExtractor']
 UpperCamelCase__			=      ['LayoutLMv3ImageProcessor']


if TYPE_CHECKING:
 from .configuration_layoutlmva import (
     LAYOUTLMV3_PRETRAINED_CONFIG_ARCHIVE_MAP,
     LayoutLMvaConfig,
     LayoutLMvaOnnxConfig,
 )
 from .processing_layoutlmva import LayoutLMvaProcessor
 from .tokenization_layoutlmva import LayoutLMvaTokenizer

 try:
  if not is_tokenizers_available():
   raise OptionalDependencyNotAvailable()
 except OptionalDependencyNotAvailable:
  pass
 else:
  from .tokenization_layoutlmva_fast import LayoutLMvaTokenizerFast

 try:
  if not is_torch_available():
   raise OptionalDependencyNotAvailable()
 except OptionalDependencyNotAvailable:
  pass
 else:
  from .modeling_layoutlmva import (
      LAYOUTLMV3_PRETRAINED_MODEL_ARCHIVE_LIST,
      LayoutLMvaForQuestionAnswering,
      LayoutLMvaForSequenceClassification,
      LayoutLMvaForTokenClassification,
      LayoutLMvaModel,
      LayoutLMvaPreTrainedModel,
  )

 try:
  if not is_tf_available():
   raise OptionalDependencyNotAvailable()
 except OptionalDependencyNotAvailable:
  pass
 else:
  from .modeling_tf_layoutlmva import (
      TF_LAYOUTLMV3_PRETRAINED_MODEL_ARCHIVE_LIST,
      TFLayoutLMvaForQuestionAnswering,
      TFLayoutLMvaForSequenceClassification,
      TFLayoutLMvaForTokenClassification,
      TFLayoutLMvaModel,
      TFLayoutLMvaPreTrainedModel,
  )

 try:
  if not is_vision_available():
   raise OptionalDependencyNotAvailable()
 except OptionalDependencyNotAvailable:
  pass
 else:
  from .feature_extraction_layoutlmva import LayoutLMvaFeatureExtractor
  from .image_processing_layoutlmva import LayoutLMvaImageProcessor

else:
 import sys

 UpperCamelCase__			=      _LazyModule(__name__, globals()['__file__'], _import_structure, module_spec=__spec__)




