






'''simple docstring'''







import tempfile
import unittest

import numpy as np

import transformers
from transformers import GPTaTokenizer, GPTJConfig, is_flax_available, is_torch_available
from transformers.testing_utils import is_pt_flax_cross_test, require_flax, tooslow

from ...generation.test_flax_utils import FlaxGenerationTesterMixin
from ...test_modeling_flax_common import FlaxModelTesterMixin, ids_tensor, random_attention_mask


if is_flax_available():
			import jax
			import jax.numpy as jnp

			from transformers.modeling_flax_pytorch_utils import (
			    convert_pytorch_state_dict_to_flax,
			    load_flax_weights_in_pytorch_model,
			)
			from transformers.models.gptj.modeling_flax_gptj import FlaxGPTJForCausalLM, FlaxGPTJModel

if is_torch_available():
			import torch

class _lowercase			:




							def __init__(							self:       Dict    ,							UpperCamelCase__:       List[Any]    ,							UpperCamelCase__:       Optional[int]=14    ,							UpperCamelCase__:       Optional[Any]=7    ,							UpperCamelCase__:       Tuple=True    ,							UpperCamelCase__:       int=True    ,							UpperCamelCase__:       Any=False    ,							UpperCamelCase__:       Union[str, Any]=True    ,							UpperCamelCase__:       Union[str, Any]=99    ,							UpperCamelCase__:       List[Any]=32    ,							UpperCamelCase__:       List[str]=4    ,							UpperCamelCase__:       Optional[int]=4    ,							UpperCamelCase__:       Union[str, Any]=4    ,							UpperCamelCase__:       int=37    ,							UpperCamelCase__:       List[str]="gelu"    ,							UpperCamelCase__:       str=0.1    ,							UpperCamelCase__:       Optional[int]=0.1    ,							UpperCamelCase__:       List[Any]=512    ,							UpperCamelCase__:       Union[str, Any]=0.02    ,							):
														lowerCamelCase__      :			Optional[Any] 						= parent
														lowerCamelCase__      :			Union[str, Any] 						= batch_size
														lowerCamelCase__      :			Optional[int] 						= seq_length
														lowerCamelCase__      :			List[str] 						= is_training
														lowerCamelCase__      :			int 						= use_input_mask
														lowerCamelCase__      :			Optional[int] 						= use_token_type_ids
														lowerCamelCase__      :			Tuple 						= use_labels
														lowerCamelCase__      :			List[str] 						= vocab_size
														lowerCamelCase__      :			List[Any] 						= hidden_size
														lowerCamelCase__      :			Dict 						= rotary_dim
														lowerCamelCase__      :			Optional[Any] 						= num_hidden_layers
														lowerCamelCase__      :			int 						= num_attention_heads
														lowerCamelCase__      :			Optional[int] 						= intermediate_size
														lowerCamelCase__      :			int 						= hidden_act
														lowerCamelCase__      :			Dict 						= hidden_dropout_prob
														lowerCamelCase__      :			Dict 						= attention_probs_dropout_prob
														lowerCamelCase__      :			Dict 						= max_position_embeddings
														lowerCamelCase__      :			List[Any] 						= initializer_range
														lowerCamelCase__      :			List[Any] 						= None
														lowerCamelCase__      :			str 						= vocab_size - 1
														lowerCamelCase__      :			Dict 						= vocab_size - 1
														lowerCamelCase__      :			int 						= vocab_size - 1




							def 	lowerCamelCase_       (							self:       int  ):
														lowerCamelCase__      :			Optional[Any] 						= ids_tensor([self.batch_size, self.seq_length]    ,							self.vocab_size  )

														lowerCamelCase__      :			List[Any] 						= None
														if self.use_input_mask:
																					lowerCamelCase__      :			List[Any] 						= random_attention_mask([self.batch_size, self.seq_length]  )

														lowerCamelCase__      :			Tuple 						= GPTJConfig(
														    vocab_size=self.vocab_size    ,							n_embd=self.hidden_size    ,							n_layer=self.num_hidden_layers    ,							n_head=self.num_attention_heads    ,							n_positions=self.max_position_embeddings    ,							use_cache=_lowercase    ,							bos_token_id=self.bos_token_id    ,							eos_token_id=self.eos_token_id    ,							pad_token_id=self.pad_token_id    ,							rotary_dim=self.rotary_dim    ,							)

														return (config, input_ids, input_mask)




							def 	lowerCamelCase_       (							self:       List[str]  ):
														lowerCamelCase__      :			List[str] 						= self.prepare_config_and_inputs()
														lowerCamelCase__						,	lowerCamelCase__						,	lowerCamelCase__      :			Optional[int] 						= config_and_inputs
														lowerCamelCase__      :			List[Any] 						= {"""input_ids""": input_ids, """attention_mask""": attention_mask}
														return config, inputs_dict




							def 	lowerCamelCase_       (							self:       Any    ,							UpperCamelCase__:       List[Any]    ,							UpperCamelCase__:       List[Any]    ,							UpperCamelCase__:       List[str]    ,							UpperCamelCase__:       Optional[Any]  ):
														lowerCamelCase__      :			str 						= 20
														lowerCamelCase__      :			Optional[Any] 						= model_class_name(_lowercase  )

														lowerCamelCase__      :			Optional[int] 						= model.init_cache(input_ids.shape[0]    ,							_lowercase  )
														lowerCamelCase__      :			Tuple 						= jnp.ones((input_ids.shape[0], max_decoder_length)    ,							dtype="""i4"""  )

														lowerCamelCase__      :			List[str] 						= jnp.broadcast_to(
														    jnp.arange(input_ids.shape[-1] - 1  )[None, :]    ,							(input_ids.shape[0], input_ids.shape[-1] - 1)  )
														lowerCamelCase__      :			Optional[Any] 						= model(
														    input_ids[:, :-1]    ,							attention_mask=_lowercase    ,							past_key_values=_lowercase    ,							position_ids=_lowercase    ,							)

														lowerCamelCase__      :			int 						= jnp.array(input_ids.shape[0] * [[input_ids.shape[-1] - 1]]    ,							dtype="""i4"""  )
														lowerCamelCase__      :			Any 						= model(
														    input_ids[:, -1:]    ,							attention_mask=_lowercase    ,							past_key_values=outputs_cache.past_key_values    ,							position_ids=_lowercase    ,							)

														lowerCamelCase__      :			Optional[Any] 						= model(_lowercase  )

														lowerCamelCase__      :			str 						= np.max(np.abs((outputs_cache_next[0][:, -1, :5] - outputs[0][:, -1, :5])  )  )
														self.parent.assertTrue(diff < 1e-3    ,							msg=F'''Max diff is {diff}'''  )




							def 	lowerCamelCase_       (							self:       Dict    ,							UpperCamelCase__:       List[Any]    ,							UpperCamelCase__:       int    ,							UpperCamelCase__:       Union[str, Any]    ,							UpperCamelCase__:       List[str]  ):
														lowerCamelCase__      :			Dict 						= 20
														lowerCamelCase__      :			Optional[Any] 						= model_class_name(_lowercase  )

														lowerCamelCase__      :			Optional[int] 						= jnp.concatenate(
														    [attention_mask, jnp.zeros((attention_mask.shape[0], max_decoder_length - attention_mask.shape[1])  )]    ,							axis=-1    ,							)

														lowerCamelCase__      :			Tuple 						= model.init_cache(input_ids.shape[0]    ,							_lowercase  )
														lowerCamelCase__      :			Optional[Any] 						= jnp.broadcast_to(
														    jnp.arange(input_ids.shape[-1] - 1  )[None, :]    ,							(input_ids.shape[0], input_ids.shape[-1] - 1)  )

														lowerCamelCase__      :			Any 						= model(
														    input_ids[:, :-1]    ,							attention_mask=_lowercase    ,							past_key_values=_lowercase    ,							position_ids=_lowercase    ,							)
														lowerCamelCase__      :			Tuple 						= jnp.array(input_ids.shape[0] * [[input_ids.shape[-1] - 1]]    ,							dtype="""i4"""  )
														lowerCamelCase__      :			Tuple 						= model(
														    input_ids[:, -1:]    ,							past_key_values=outputs_cache.past_key_values    ,							attention_mask=_lowercase    ,							position_ids=_lowercase    ,							)

														lowerCamelCase__      :			Any 						= model(_lowercase    ,							attention_mask=_lowercase  )

														lowerCamelCase__      :			Tuple 						= np.max(np.abs((outputs_cache_next[0][:, -1, :5] - outputs[0][:, -1, :5])  )  )
														self.parent.assertTrue(diff < 1e-3    ,							msg=F'''Max diff is {diff}'''  )



@require_flax
class _lowercase			(       UpperCAmelCase_       ,   UpperCAmelCase_       ,   unittest.TestCase	):
							a          = (FlaxGPTJModel, FlaxGPTJForCausalLM) if is_flax_available() else ()
							a          = (FlaxGPTJForCausalLM,) if is_flax_available() else ()




							def 	lowerCamelCase_       (							self:       List[str]  ):
														lowerCamelCase__      :			List[str] 						= FlaxGPTJModelTester(self  )




							def 	lowerCamelCase_       (							self:       List[str]  ):
														for model_class_name in self.all_model_classes:
																					lowerCamelCase__						,	lowerCamelCase__						,	lowerCamelCase__      :			Any 						= self.model_tester.prepare_config_and_inputs()
																					self.model_tester.check_use_cache_forward(_lowercase    ,							_lowercase    ,							_lowercase    ,							_lowercase  )




							def 	lowerCamelCase_       (							self:       List[Any]  ):
														for model_class_name in self.all_model_classes:
																					lowerCamelCase__						,	lowerCamelCase__						,	lowerCamelCase__      :			Optional[int] 						= self.model_tester.prepare_config_and_inputs()
																					self.model_tester.check_use_cache_forward_with_attn_mask(
																					    _lowercase    ,							_lowercase    ,							_lowercase    ,							_lowercase  )




							@tooslow
							def 	lowerCamelCase_       (							self:       Optional[Any]  ):
														lowerCamelCase__      :			Tuple 						= GPTaTokenizer.from_pretrained("""gpt2"""    ,							pad_token="""<|endoftext|>"""    ,							padding_side="""left"""  )
														lowerCamelCase__      :			int 						= tokenizer(["""Hello this is a long string""", """Hey"""]    ,							return_tensors="""np"""    ,							padding=_lowercase    ,							truncation=_lowercase  )

														lowerCamelCase__      :			List[str] 						= FlaxGPTJForCausalLM.from_pretrained("""EleutherAI/gpt-j-6B"""  )
														lowerCamelCase__      :			str 						= False
														lowerCamelCase__      :			Dict 						= model.config.eos_token_id

														lowerCamelCase__      :			Union[str, Any] 						= jax.jit(model.generate  )

														lowerCamelCase__      :			Tuple 						= jit_generate(
														    inputs["""input_ids"""]    ,							attention_mask=inputs["""attention_mask"""]    ,							pad_token_id=tokenizer.pad_token_id  ).sequences

														lowerCamelCase__      :			Union[str, Any] 						= tokenizer.batch_decode(_lowercase    ,							skip_special_tokens=_lowercase  )

														lowerCamelCase__      :			Any 						= [
														    """Hello this is a long string of text.\n\nI\'m trying to get the text of the""",
														    """Hey, I\'m a little late to the party. I\'m going to""",
														]

														self.assertListEqual(_lowercase    ,							_lowercase  )




							@is_pt_flax_cross_test
							def 	lowerCamelCase_       (							self:       Union[str, Any]  ):
														lowerCamelCase__						,	lowerCamelCase__      :			int 						= self.model_tester.prepare_config_and_inputs_for_common()

														for model_class in self.all_model_classes:
																					with self.subTest(model_class.__name__  ):
																												# prepare inputs
																												lowerCamelCase__      :			str 						= self._prepare_for_class(_lowercase    ,							_lowercase  )
																												lowerCamelCase__      :			int 						= {k: torch.tensor(v.tolist()  ) for k, v in prepared_inputs_dict.items()}

																												# load corresponding PyTorch class
																												lowerCamelCase__      :			Tuple 						= model_class.__name__[4:]  # Skip the "Flax" at the beginning
																												lowerCamelCase__      :			List[str] 						= getattr(_lowercase    ,							_lowercase  )

																												lowerCamelCase__						,	lowerCamelCase__      :			Any 						= pt_inputs["""input_ids"""].shape
																												lowerCamelCase__      :			List[Any] 						= np.random.randint(0    ,							seq_length - 1    ,							size=(batch_size,)  )
																												for batch_idx, start_index in enumerate(_lowercase  ):
																																			lowerCamelCase__      :			int 						= 0
																																			lowerCamelCase__      :			Any 						= 1
																																			lowerCamelCase__      :			Any 						= 0
																																			lowerCamelCase__      :			Union[str, Any] 						= 1
																												lowerCamelCase__      :			Optional[Any] 						= pt_model_class(_lowercase  ).eval()
																												lowerCamelCase__      :			List[str] 						= model_class(_lowercase    ,							dtype=jnp.floataa  )

																												lowerCamelCase__      :			Any 						= convert_pytorch_state_dict_to_flax(pt_model.state_dict()    ,							_lowercase  )
																												lowerCamelCase__      :			Optional[int] 						= fx_state

																												with torch.no_grad():
																																			lowerCamelCase__      :			str 						= pt_model(**_lowercase  ).to_tuple()

																												lowerCamelCase__      :			Any 						= fx_model(**_lowercase  ).to_tuple()
																												self.assertEqual(len(_lowercase  )    ,							len(_lowercase  )    ,							"""Output lengths differ between Flax and PyTorch"""  )
																												for fx_output, pt_output in zip(_lowercase    ,							_lowercase  ):
																																			self.assert_almost_equals(fx_output[:, -1]    ,							pt_output[:, -1].numpy()    ,							4e-2  )

																												with tempfile.TemporaryDirectory() as tmpdirname:
																																			pt_model.save_pretrained(_lowercase  )
																																			lowerCamelCase__      :			Dict 						= model_class.from_pretrained(_lowercase    ,							from_pt=_lowercase  )

																												lowerCamelCase__      :			Optional[Any] 						= fx_model_loaded(**_lowercase  ).to_tuple()
																												self.assertEqual(
																												    len(_lowercase  )    ,							len(_lowercase  )    ,							"""Output lengths differ between Flax and PyTorch"""  )
																												for fx_output_loaded, pt_output in zip(_lowercase    ,							_lowercase  ):
																																			self.assert_almost_equals(fx_output_loaded[:, -1]    ,							pt_output[:, -1].numpy()    ,							4e-2  )




							@is_pt_flax_cross_test
							def 	lowerCamelCase_       (							self:       Dict  ):
														lowerCamelCase__						,	lowerCamelCase__      :			Any 						= self.model_tester.prepare_config_and_inputs_for_common()
														for model_class in self.all_model_classes:
																					with self.subTest(model_class.__name__  ):
																												# prepare inputs
																												lowerCamelCase__      :			Optional[int] 						= self._prepare_for_class(_lowercase    ,							_lowercase  )
																												lowerCamelCase__      :			Union[str, Any] 						= {k: torch.tensor(v.tolist()  ) for k, v in prepared_inputs_dict.items()}

																												# load corresponding PyTorch class
																												lowerCamelCase__      :			List[Any] 						= model_class.__name__[4:]  # Skip the "Flax" at the beginning
																												lowerCamelCase__      :			List[Any] 						= getattr(_lowercase    ,							_lowercase  )

																												lowerCamelCase__      :			Union[str, Any] 						= pt_model_class(_lowercase  ).eval()
																												lowerCamelCase__      :			Union[str, Any] 						= model_class(_lowercase    ,							dtype=jnp.floataa  )

																												lowerCamelCase__      :			str 						= load_flax_weights_in_pytorch_model(_lowercase    ,							fx_model.params  )
																												lowerCamelCase__						,	lowerCamelCase__      :			Optional[int] 						= pt_inputs["""input_ids"""].shape
																												lowerCamelCase__      :			Any 						= np.random.randint(0    ,							seq_length - 1    ,							size=(batch_size,)  )
																												for batch_idx, start_index in enumerate(_lowercase  ):
																																			lowerCamelCase__      :			Union[str, Any] 						= 0
																																			lowerCamelCase__      :			int 						= 1
																																			lowerCamelCase__      :			List[Any] 						= 0
																																			lowerCamelCase__      :			int 						= 1

																												# make sure weights are tied in PyTorch
																												pt_model.tie_weights()

																												with torch.no_grad():
																																			lowerCamelCase__      :			Union[str, Any] 						= pt_model(**_lowercase  ).to_tuple()

																												lowerCamelCase__      :			List[Any] 						= fx_model(**_lowercase  ).to_tuple()
																												self.assertEqual(len(_lowercase  )    ,							len(_lowercase  )    ,							"""Output lengths differ between Flax and PyTorch"""  )
																												for fx_output, pt_output in zip(_lowercase    ,							_lowercase  ):
																																			self.assert_almost_equals(fx_output[:, -1]    ,							pt_output[:, -1].numpy()    ,							4e-2  )

																												with tempfile.TemporaryDirectory() as tmpdirname:
																																			fx_model.save_pretrained(_lowercase  )
																																			lowerCamelCase__      :			int 						= pt_model_class.from_pretrained(_lowercase    ,							from_flax=_lowercase  )

																												with torch.no_grad():
																																			lowerCamelCase__      :			Optional[Any] 						= pt_model_loaded(**_lowercase  ).to_tuple()

																												self.assertEqual(
																												    len(_lowercase  )    ,							len(_lowercase  )    ,							"""Output lengths differ between Flax and PyTorch"""  )
																												for fx_output, pt_output in zip(_lowercase    ,							_lowercase  ):
																																			self.assert_almost_equals(fx_output[:, -1]    ,							pt_output[:, -1].numpy()    ,							4e-2  )




							@tooslow
							def 	lowerCamelCase_       (							self:       Optional[Any]  ):
														for model_class_name in self.all_model_classes:
																					lowerCamelCase__      :			str 						= model_class_name.from_pretrained("""EleutherAI/gpt-j-6B"""  )
																					lowerCamelCase__      :			Union[str, Any] 						= model(np.ones((1, 1)  )  )
																					self.assertIsNotNone(_lowercase  )









'''simple docstring'''







import argparse
import os
import re

import packaging.version


_A			:    List[str]					  ='''examples/'''
_A			:    Any					  ={
    '''examples''': (re.compile(r'''^check_min_version\("[^"]+"\)\s*$''', re.MULTILINE), '''check_min_version("VERSION")\n'''),
    '''init''': (re.compile(r'''^__version__\s+=\s+"([^"]+)"\s*$''', re.MULTILINE), '''__version__ = "VERSION"\n'''),
    '''setup''': (re.compile(r'''^(\s*)version\s*=\s*"[^"]+",''', re.MULTILINE), r'''\1version="VERSION",'''),
    '''doc''': (re.compile(r'''^(\s*)release\s*=\s*"[^"]+"$''', re.MULTILINE), '''release = "VERSION"\n'''),
}
_A			:    int					  ={
    '''init''': '''src/transformers/__init__.py''',
    '''setup''': '''setup.py''',
}
_A			:    int					  ='''README.md'''





def 				SCREAMING_SNAKE_CASE_ (UpperCamelCase       ,    UpperCamelCase       ,    UpperCamelCase   )   -> str:
							with open(UpperCamelCase       ,    """r"""       ,    encoding="""utf-8"""       ,    newline="""\n"""   ) as f:
														lowerCamelCase__      :			List[str] 						= f.read()
							lowerCamelCase__						,	lowerCamelCase__      :			Optional[int] 						= REPLACE_PATTERNS[pattern]
							lowerCamelCase__      :			Dict 						= replace.replace("""VERSION"""       ,    UpperCamelCase   )
							lowerCamelCase__      :			str 						= re_pattern.sub(UpperCamelCase       ,    UpperCamelCase   )
							with open(UpperCamelCase       ,    """w"""       ,    encoding="""utf-8"""       ,    newline="""\n"""   ) as f:
														f.write(UpperCamelCase   )





def 				SCREAMING_SNAKE_CASE_ (UpperCamelCase   )   -> str:
							for folder, directories, fnames in os.walk(UpperCamelCase   ):
														# Removing some of the folders with non-actively maintained examples from the walk
														if "research_projects" in directories:
																					directories.remove("""research_projects"""   )
														if "legacy" in directories:
																					directories.remove("""legacy"""   )
														for fname in fnames:
																					if fname.endswith(""".py"""   ):
																												update_version_in_file(os.path.join(UpperCamelCase       ,    UpperCamelCase   )       ,    UpperCamelCase       ,    pattern="""examples"""   )





def 				SCREAMING_SNAKE_CASE_ (UpperCamelCase       ,    UpperCamelCase=False   )   -> List[Any]:
							for pattern, fname in REPLACE_FILES.items():
														update_version_in_file(UpperCamelCase       ,    UpperCamelCase       ,    UpperCamelCase   )
							if not patch:
														update_version_in_examples(UpperCamelCase   )





def 				SCREAMING_SNAKE_CASE_ ()   -> Optional[Any]:
							lowerCamelCase__      :			Dict 						= """🤗 Transformers currently provides the following architectures"""
							lowerCamelCase__      :			Dict 						= """1. Want to contribute a new model?"""
							with open(UpperCamelCase       ,    """r"""       ,    encoding="""utf-8"""       ,    newline="""\n"""   ) as f:
														lowerCamelCase__      :			int 						= f.readlines()

							# Find the start of the list.
							lowerCamelCase__      :			Optional[int] 						= 0
							while not lines[start_index].startswith(_start_prompt   ):
														start_index += 1
							start_index += 1

							lowerCamelCase__      :			Optional[Any] 						= start_index
							# Update the lines in the model list.
							while not lines[index].startswith(_end_prompt   ):
														if lines[index].startswith("""1."""   ):
																					lowerCamelCase__      :			List[Any] 						= lines[index].replace(
																					    """https://huggingface.co/docs/transformers/main/model_doc"""       ,    """https://huggingface.co/docs/transformers/model_doc"""       ,    )
														index += 1

							with open(UpperCamelCase       ,    """w"""       ,    encoding="""utf-8"""       ,    newline="""\n"""   ) as f:
														f.writelines(UpperCamelCase   )





def 				SCREAMING_SNAKE_CASE_ ()   -> Optional[Any]:
							with open(REPLACE_FILES["""init"""]       ,    """r"""   ) as f:
														lowerCamelCase__      :			int 						= f.read()
							lowerCamelCase__      :			Optional[Any] 						= REPLACE_PATTERNS["""init"""][0].search(UpperCamelCase   ).groups()[0]
							return packaging.version.parse(UpperCamelCase   )





def 				SCREAMING_SNAKE_CASE_ (UpperCamelCase=False   )   -> List[Any]:
							lowerCamelCase__      :			Union[str, Any] 						= get_version()
							if patch and default_version.is_devrelease:
														raise ValueError("""Can't create a patch version from the dev branch, checkout a released version!"""   )
							if default_version.is_devrelease:
														lowerCamelCase__      :			List[str] 						= default_version.base_version
							elif patch:
														lowerCamelCase__      :			Any 						= f'''{default_version.major}.{default_version.minor}.{default_version.micro + 1}'''
							else:
														lowerCamelCase__      :			List[Any] 						= f'''{default_version.major}.{default_version.minor + 1}.0'''

							# Now let's ask nicely if that's the right one.
							lowerCamelCase__      :			Any 						= input(f'''Which version are you releasing? [{default_version}]'''   )
							if len(UpperCamelCase   ) == 0:
														lowerCamelCase__      :			Optional[int] 						= default_version

							print(f'''Updating version to {version}.'''   )
							global_version_update(UpperCamelCase       ,    patch=UpperCamelCase   )
							if not patch:
														print("""Cleaning main README, don't forget to run `make fix-copies`."""   )
														clean_main_ref_in_model_list()





def 				SCREAMING_SNAKE_CASE_ ()   -> List[str]:
							lowerCamelCase__      :			Optional[int] 						= get_version()
							lowerCamelCase__      :			Any 						= f'''{current_version.major}.{current_version.minor + 1}.0.dev0'''
							lowerCamelCase__      :			Any 						= current_version.base_version

							# Check with the user we got that right.
							lowerCamelCase__      :			List[Any] 						= input(f'''Which version are we developing now? [{dev_version}]'''   )
							if len(UpperCamelCase   ) == 0:
														lowerCamelCase__      :			Dict 						= dev_version

							print(f'''Updating version to {version}.'''   )
							global_version_update(UpperCamelCase   )
							print("""Cleaning main README, don't forget to run `make fix-copies`."""   )
							clean_main_ref_in_model_list()


if __name__ == "__main__":
			_A			:    List[Any]					  =argparse.ArgumentParser()
			parser.add_argument('''--post_release''', action='''store_true''', help='''Whether this is pre or post release.''')
			parser.add_argument('''--patch''', action='''store_true''', help='''Whether or not this is a patch release.''')
			_A			:    List[str]					  =parser.parse_args()
			if not args.post_release:
						pre_release_work(patch=args.patch)
			elif args.patch:
						print('''Nothing to do after a patch :-)''')
			else:
						post_release_work()

