




"""simple docstring"""


from packaging import version

from .import_utils import is_accelerate_available


if is_accelerate_available():
     import accelerate


def  UpperCAmelCase__	(snake_case__							: Dict   ):
  """simple docstring"""

  if not is_accelerate_available():
    return method
  _snake_case							:		List[str]								=  version.parse(accelerate.__version__   ).base_version
  if version.parse(snake_case__   ) < version.parse("""0.17.0"""   ):
    return method

  def wrapper(self							: Any		,       *snake_case__							: List[str]		,       **snake_case__							: Any   ):
    if hasattr(self		,       """_hf_hook"""   ) and hasattr(self._hf_hook		,       """pre_forward"""   ):
      self._hf_hook.pre_forward(self   )
    return method(self		,       *snake_case__		,       **snake_case__   )

  return wrapper








"""simple docstring"""


from .data_collator import (
    DataCollatorForLanguageModeling,
    DataCollatorForPermutationLanguageModeling,
    DataCollatorForSeqaSeq,
    DataCollatorForSOP,
    DataCollatorForTokenClassification,
    DataCollatorForWholeWordMask,
    DataCollatorWithPadding,
    DefaultDataCollator,
    default_data_collator,
)
from .metrics import glue_compute_metrics, xnli_compute_metrics
from .processors import (
    DataProcessor,
    InputExample,
    InputFeatures,
    SingleSentenceClassificationProcessor,
    SquadExample,
    SquadFeatures,
    SquadVaProcessor,
    SquadVaProcessor,
    glue_convert_examples_to_features,
    glue_output_modes,
    glue_processors,
    glue_tasks_num_labels,
    squad_convert_examples_to_features,
    xnli_output_modes,
    xnli_processors,
    xnli_tasks_num_labels,
)


