



'''simple docstring'''






import pickle
import unittest

import torch

from accelerate import Accelerator
from accelerate.state import AcceleratorState
from accelerate.test_utils import require_cpu

@require_cpu
class 				SCREAMING_SNAKE_CASE(							unittest.TestCase			):







	"""simple docstring"""






	def      A	(						self			:     Optional[Any]		)			->		Optional[Any]:
								UpperCAmelCase :       int 							=		torch.nn.Linear(10		,			10		)
								UpperCAmelCase :       List[Any] 							=		torch.optim.SGD(model.parameters()		,			0.1		)
								UpperCAmelCase :       int 							=		Accelerator()
								UpperCAmelCase :       List[str] 							=		accelerator.prepare(__snake_case		)
								try:
															pickle.loads(pickle.dumps(__snake_case		)		)
								except Exception as e:
															self.fail(F"""Accelerated optimizer pickling failed with {e}"""		)
								AcceleratorState._reset_state()








import warnings

from ...utils import logging
from .image_processing_flava import FlavaImageProcessor


snake_case_			  = logging.get_logger(__name__)


class       SCREAMING_SNAKE_CASE__					(__snake_case     ):





    def __init__(      self						,   *a						,   **a):
         warnings.warn(
             'The class FlavaFeatureExtractor is deprecated and will be removed in version 5 of Transformers. Please'
             ' use FlavaImageProcessor instead.'						,   a						,   )
         super().__init__(*a						,   **a)

