




"""simple docstring"""
from collections import OrderedDict
from typing import Mapping

from ...configuration_utils import PretrainedConfig
from ...onnx import OnnxConfigWithPast
from ...utils import logging


_SCREAMING_SNAKE_CASE						 =     logging.get_logger(__name__)

_SCREAMING_SNAKE_CASE						 =     {
    """uclanlp/plbart-base""": """https://huggingface.co/uclanlp/plbart-base/resolve/main/config.json""",
    # See all PLBART models at https://huggingface.co/models?filter=plbart
}







class  _SCREAMING_SNAKE_CASE       (     SCREAMING_SNAKE_CASE__				):



 '''simple docstring'''





 __UpperCAmelCase		   =							"""plbart"""
 __UpperCAmelCase		   =							["""past_key_values"""]
 __UpperCAmelCase		   =							{"""num_attention_heads""": """encoder_attention_heads""", """hidden_size""": """d_model"""}






 def __init__(self					,     lowerCAmelCase__=5_00_05					,     lowerCAmelCase__=10_24					,     lowerCAmelCase__=6					,     lowerCAmelCase__=30_72					,     lowerCAmelCase__=12					,     lowerCAmelCase__=6					,     lowerCAmelCase__=30_72					,     lowerCAmelCase__=12					,     lowerCAmelCase__=0.0					,     lowerCAmelCase__=0.0					,     lowerCAmelCase__=True					,     lowerCAmelCase__=True					,     lowerCAmelCase__="gelu"					,     lowerCAmelCase__=7_68					,     lowerCAmelCase__=0.1					,     lowerCAmelCase__=0.1					,     lowerCAmelCase__=0.0					,     lowerCAmelCase__=0.02					,     lowerCAmelCase__=0.0					,     lowerCAmelCase__=True					,     lowerCAmelCase__=1					,     lowerCAmelCase__=0					,     lowerCAmelCase__=2					,     lowerCAmelCase__=2					,     **lowerCAmelCase__					,     ):

  '''simple docstring'''







  _UpperCamelCase      :	Tuple					      =  vocab_size
  _UpperCamelCase      :	Optional[int]					      =  max_position_embeddings
  _UpperCamelCase      :	Dict					      =  d_model
  _UpperCamelCase      :	Optional[int]					      =  encoder_ffn_dim
  _UpperCamelCase      :	Any					      =  encoder_layers
  _UpperCamelCase      :	Optional[Any]					      =  encoder_attention_heads
  _UpperCamelCase      :	Dict					      =  decoder_ffn_dim
  _UpperCamelCase      :	List[str]					      =  decoder_layers
  _UpperCamelCase      :	Tuple					      =  decoder_attention_heads
  _UpperCamelCase      :	Tuple					      =  dropout
  _UpperCamelCase      :	Optional[Any]					      =  attention_dropout
  _UpperCamelCase      :	Tuple					      =  activation_dropout
  _UpperCamelCase      :	Any					      =  activation_function
  _UpperCamelCase      :	Optional[int]					      =  init_std
  _UpperCamelCase      :	str					      =  encoder_layerdrop
  _UpperCamelCase      :	List[str]					      =  decoder_layerdrop
  _UpperCamelCase      :	Optional[Any]					      =  classifier_dropout
  _UpperCamelCase      :	str					      =  use_cache
  _UpperCamelCase      :	int					      =  encoder_layers
  _UpperCamelCase      :	Optional[int]					      =  scale_embedding  # scale factor will be sqrt(d_model) if True
  super().__init__(
      pad_token_id=lowerCAmelCase__					,     bos_token_id=lowerCAmelCase__					,     eos_token_id=lowerCAmelCase__					,     is_encoder_decoder=lowerCAmelCase__					,     forced_eos_token_id=lowerCAmelCase__					,     **lowerCAmelCase__					,     )







class  _SCREAMING_SNAKE_CASE       (     SCREAMING_SNAKE_CASE__				):



 '''simple docstring'''





 @property
 def lowercase_      (self   ):

  '''simple docstring'''







  return OrderedDict(
      [
          ("input_ids", {0: "batch", 1: "sequence"}),
          ("attention_mask", {0: "batch", 1: "sequence"}),
      ]   )






 @property
 def lowercase_      (self   ):

  '''simple docstring'''







  if self.use_past:
   return OrderedDict(
       [
           ("last_hidden_state", {0: "batch", 1: "sequence"}),
           ("past_keys", {0: "batch", 2: "sequence"}),
           ("encoder_last_hidden_state", {0: "batch", 1: "sequence"}),
       ]   )
  else:
   return OrderedDict(
       [
           ("last_hidden_state", {0: "batch", 1: "sequence"}),
           ("encoder_last_hidden_state", {0: "batch", 1: "sequence"}),
       ]   )









"""simple docstring"""
import platform
from argparse import ArgumentParser

import huggingface_hub
import pandas
import pyarrow

from datasets import __version__ as version
from datasets.commands import BaseDatasetsCLICommand






def 				__lowerCAmelCase					(					__lowerCAmelCase			:		Union[str, Any]						)    ->       int:
 return EnvironmentCommand()







class  _SCREAMING_SNAKE_CASE       (     SCREAMING_SNAKE_CASE__				):



 '''simple docstring'''





 @staticmethod
 def lowercase_      (lowerCAmelCase__   ):

  '''simple docstring'''







  _UpperCamelCase      :	Optional[Any]					      =  parser.add_parser("env"					,     help="Print relevant system environment info."   )
  download_parser.set_defaults(func=lowerCAmelCase__   )






 def lowercase_      (self   ):

  '''simple docstring'''







  _UpperCamelCase      :	Any					      =  {
      "`datasets` version": version,
      "Platform": platform.platform(),
      "Python version": platform.python_version(),
      "Huggingface_hub version": huggingface_hub.__version__,
      "PyArrow version": pyarrow.__version__,
      "Pandas version": pandas.__version__,
  }

  print("\nCopy-and-paste the text below in your GitHub issue.\n"   )
  print(self.format_dict(lowerCAmelCase__   )   )

  return info






 @staticmethod
 def lowercase_      (lowerCAmelCase__   ):

  '''simple docstring'''







  return "\n".join([F"- {prop}: {val}" for prop, val in d.items()]   ) + "\n"



