




"""simple docstring"""






def 							UpperCAmelCase		(		snake_case			:					int    ):
					if number > 0:
										raise ValueError('''input must be a negative integer'''    )
					_lowerCAmelCase:Tuple									=  len(bin(snake_case    )[3:]    )
					_lowerCAmelCase:Any									=  bin(abs(snake_case    ) - (1 << binary_number_length)    )[3:]
					_lowerCAmelCase:List[str]									=  (
					    (
					        '''1'''
					        + '''0''' * (binary_number_length - len(snake_case    ))
					        + twos_complement_number
					    )
					    if number < 0
					    else '''0'''
					)
					return "0b" + twos_complement_number


if __name__ == "__main__":
				import doctest

				doctest.testmod()












"""simple docstring"""






from argparse import ArgumentParser

from .add_new_model import AddNewModelCommand
from .add_new_model_like import AddNewModelLikeCommand
from .convert import ConvertCommand
from .download import DownloadCommand
from .env import EnvironmentCommand
from .lfs import LfsCommands
from .pt_to_tf import PTtoTFCommand
from .run import RunCommand
from .serving import ServeCommand
from .user import UserCommands





def 							UpperCAmelCase		(		):
					_lowerCAmelCase:List[Any]									=  ArgumentParser('''Transformers CLI tool'''      ,       usage='''transformers-cli <command> [<args>]'''    )
					_lowerCAmelCase:Union[str, Any]									=  parser.add_subparsers(help='''transformers-cli command helpers'''    )

					# Register commands
					ConvertCommand.register_subcommand(snake_case    )
					DownloadCommand.register_subcommand(snake_case    )
					EnvironmentCommand.register_subcommand(snake_case    )
					RunCommand.register_subcommand(snake_case    )
					ServeCommand.register_subcommand(snake_case    )
					UserCommands.register_subcommand(snake_case    )
					AddNewModelCommand.register_subcommand(snake_case    )
					AddNewModelLikeCommand.register_subcommand(snake_case    )
					LfsCommands.register_subcommand(snake_case    )
					PTtoTFCommand.register_subcommand(snake_case    )

					# Let's go
					_lowerCAmelCase:Union[str, Any]									=  parser.parse_args()

					if not hasattr(snake_case      ,       '''func'''    ):
										parser.print_help()
										exit(1    )

					# Run
					_lowerCAmelCase:Any									=  args.func(snake_case    )
					service.run()


if __name__ == "__main__":
				main()






