'''simple docstring'''

from unittest import TestCase

from datasets import Dataset
from minhash_deduplication import deduplicate_dataset, make_duplicate_clusters


def __a (	)	->							Tuple:
      '''simple docstring'''


      lowercase_     =      {
          "repo_name": ["test_repo1", "test_repo2", "test_repo3"],
          "path": ["test_1.py", "test_2.py", "unit_test.py"],
          "content": ["a " * 20, "a " * 30, "b " * 7],
      }
      lowercase_     =      Dataset.from_dict(__lowerCamelCase				)
      return dataset






class 							lowercase						(						__lowerCamelCase ):


   def __UpperCAmelCase       (   self				:	Tuple)      ->					int:
         lowercase_     =      get_dataset()
         lowercase_     =      make_duplicate_clusters(__lowerCAmelCase   ,		0.85)
         self.assertEqual(len(duplicate_clusters[0])   ,		2)


   def __UpperCAmelCase       (   self				:	int)      ->					Union[str, Any]:
         lowercase_     =      get_dataset()
         lowercase_ ,							lowercase_     =      deduplicate_dataset(__lowerCAmelCase)
         self.assertEqual(len(__lowerCAmelCase)   ,		2)
         print(__lowerCAmelCase)
         self.assertEqual(duplicate_clusters[0][0]["copies"]   ,		2)
         self.assertEqual(duplicate_clusters[0][0]["is_extreme"]   ,		__lowerCAmelCase)







'''simple docstring'''

from ...configuration_utils import PretrainedConfig
from ...utils import logging


lowerCAmelCase_ : Dict						  =      logging.get_logger(__name__)

lowerCAmelCase_ : List[Any]						  =      {
    "unc-nlp/lxmert-base-uncased": "https://huggingface.co/unc-nlp/lxmert-base-uncased/resolve/main/config.json",
}





class 							lowercase						(						__lowerCamelCase ):
   lowerCamelCase_    					='lxmert'
   lowerCamelCase_    					={}


   def __init__(   self				:	str   ,		__lowerCAmelCase				:	str=3_0522   ,		__lowerCAmelCase				:	Dict=768   ,		__lowerCAmelCase				:	List[str]=12   ,		__lowerCAmelCase				:	List[str]=9500   ,		__lowerCAmelCase				:	Optional[int]=1600   ,		__lowerCAmelCase				:	Tuple=400   ,		__lowerCAmelCase				:	str=3072   ,		__lowerCAmelCase				:	str="gelu"   ,		__lowerCAmelCase				:	Optional[Any]=0.1   ,		__lowerCAmelCase				:	List[Any]=0.1   ,		__lowerCAmelCase				:	Tuple=512   ,		__lowerCAmelCase				:	Tuple=2   ,		__lowerCAmelCase				:	Dict=0.02   ,		__lowerCAmelCase				:	int=1e-12   ,		__lowerCAmelCase				:	Union[str, Any]=9   ,		__lowerCAmelCase				:	List[str]=5   ,		__lowerCAmelCase				:	Any=5   ,		__lowerCAmelCase				:	Dict=2048   ,		__lowerCAmelCase				:	Any=4   ,		__lowerCAmelCase				:	Optional[int]=6.67   ,		__lowerCAmelCase				:	Optional[Any]=True   ,		__lowerCAmelCase				:	Tuple=True   ,		__lowerCAmelCase				:	Optional[int]=True   ,		__lowerCAmelCase				:	List[Any]=True   ,		__lowerCAmelCase				:	Optional[Any]=True   ,		__lowerCAmelCase				:	int=True   ,		__lowerCAmelCase				:	List[str]=True   ,		**__lowerCAmelCase				:	Dict   ,		)      ->					Dict:
         lowercase_     =      vocab_size
         lowercase_     =      hidden_size
         lowercase_     =      num_attention_heads
         lowercase_     =      hidden_act
         lowercase_     =      intermediate_size
         lowercase_     =      hidden_dropout_prob
         lowercase_     =      attention_probs_dropout_prob
         lowercase_     =      max_position_embeddings
         lowercase_     =      type_vocab_size
         lowercase_     =      initializer_range
         lowercase_     =      layer_norm_eps
         lowercase_     =      num_qa_labels
         lowercase_     =      num_object_labels
         lowercase_     =      num_attr_labels
         lowercase_     =      l_layers
         lowercase_     =      x_layers
         lowercase_     =      r_layers
         lowercase_     =      visual_feat_dim
         lowercase_     =      visual_pos_dim
         lowercase_     =      visual_loss_normalizer
         lowercase_     =      task_matched
         lowercase_     =      task_mask_lm
         lowercase_     =      task_obj_predict
         lowercase_     =      task_qa
         lowercase_     =      visual_obj_loss
         lowercase_     =      visual_attr_loss
         lowercase_     =      visual_feat_loss
         lowercase_     =      {"vision": r_layers, "cross_encoder": x_layers, "language": l_layers}
         super().__init__(**__lowerCAmelCase)






