



'''simple docstring'''





import tempfile
import unittest

from make_student import create_student_by_copying_alternating_layers

from transformers import AutoConfig
from transformers.file_utils import cached_property
from transformers.testing_utils import require_torch


__a          =		"sshleifer/bart-tiny-random"
__a          =		"patrickvonplaten/t5-tiny-random"







@require_torch
class     UpperCAmelCase_       (       unittest.TestCase	):
    """simple docstring"""







    @cached_property
    def lowerCamelCase       (    self					:     List[Any]						):
          return AutoConfig.from_pretrained(snake_case_						)




    def lowerCamelCase       (    self					:     Dict						):
          snake_case__						,				*snake_case__  :    List[str]    						=      create_student_by_copying_alternating_layers(snake_case_ ,     tempfile.mkdtemp() ,     e=1 ,     d=1						)
          self.assertEqual(student.config.num_hidden_layers ,     1						)




    def lowerCamelCase       (    self					:     Tuple						):
          snake_case__						,				*snake_case__  :    Tuple    						=      create_student_by_copying_alternating_layers(snake_case_ ,     tempfile.mkdtemp() ,     e=1 ,     d=snake_case_						)




    def lowerCamelCase       (    self					:     Any						):
          snake_case__						,				*snake_case__  :    Tuple    						=      create_student_by_copying_alternating_layers(snake_case_ ,     tempfile.mkdtemp() ,     e=1 ,     d=snake_case_						)
          self.assertEqual(student.config.encoder_layers ,     1						)
          self.assertEqual(student.config.decoder_layers ,     self.teacher_config.encoder_layers						)




    def lowerCamelCase       (    self					:     Dict						):
          snake_case__						,				*snake_case__  :    Optional[int]    						=      create_student_by_copying_alternating_layers(snake_case_ ,     tempfile.mkdtemp() ,     e=1 ,     d=1						)
          self.assertEqual(student.config.encoder_layers ,     1						)
          self.assertEqual(student.config.decoder_layers ,     1						)




    def lowerCamelCase       (    self					:     Tuple						):
          with self.assertRaises(snake_case_						):
                create_student_by_copying_alternating_layers(snake_case_ ,     tempfile.mkdtemp() ,     e=snake_case_ ,     d=snake_case_						)





'''simple docstring'''





def 						__snake_case(				_lowerCAmelCase = 1_000		)		-> int:
      return sum(e for e in range(3     ,   _lowerCAmelCase		) if e % 3 == 0 or e % 5 == 0		)


if __name__ == "__main__":
       print(F"{solution() = }")
