
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        lowerCAmelCase__      (   unittest.TestCase	):

						def  A_				(			self				)					->      List[str]:


								'''simple docstring'''

								_UpperCamelCase						    =	torch.nn.Linear(10       ,							10				)
								_UpperCamelCase						    =	torch.optim.SGD(model.parameters()       ,							0.1				)
								_UpperCamelCase						    =	Accelerator()
								_UpperCamelCase						    =	accelerator.prepare(UpperCamelCase_				)
								try:
										pickle.loads(pickle.dumps(UpperCamelCase_				)				)
								except Exception as e:
										self.fail(F'Accelerated optimizer pickling failed with {e}'				)
								AcceleratorState._reset_state()





lowerCamelCase__	=							[
    "DownloadConfig",
    "DownloadManager",
    "DownloadMode",
    "StreamingDownloadManager",
]

from .download_config import DownloadConfig
from .download_manager import DownloadManager, DownloadMode
from .streaming_download_manager import StreamingDownloadManager



