





from typing import TYPE_CHECKING

# rely on isort to merge the imports
from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


_lowerCamelCase   				=			{
    'configuration_informer': [
        'INFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP',
        'InformerConfig',
    ],
}

try:
	if not is_torch_available():
		raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
	pass
else:
	_lowerCamelCase   				=			[
	    'INFORMER_PRETRAINED_MODEL_ARCHIVE_LIST',
	    'InformerForPrediction',
	    'InformerModel',
	    'InformerPreTrainedModel',
	]


if TYPE_CHECKING:
	from .configuration_informer import INFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP, InformerConfig

	try:
		if not is_torch_available():
			raise OptionalDependencyNotAvailable()
	except OptionalDependencyNotAvailable:
		pass
	else:
		from .modeling_informer import (
		    INFORMER_PRETRAINED_MODEL_ARCHIVE_LIST,
		    InformerForPrediction,
		    InformerModel,
		    InformerPreTrainedModel,
		)

else:
	import sys

	_lowerCamelCase   				=			_LazyModule(__name__, globals()['__file__'], _import_structure, module_spec=__spec__)






from argparse import ArgumentParser

from datasets.commands.convert import ConvertCommand
from datasets.commands.dummy_data import DummyDataCommand
from datasets.commands.env import EnvironmentCommand
from datasets.commands.run_beam import RunBeamCommand
from datasets.commands.test import TestCommand
from datasets.utils.logging import set_verbosity_info






def 				SCREAMING_SNAKE_CASE__							(       UpperCamelCase__:							Any    ):
		return {key.lstrip("""-"""    ): value for key, value in zip(unknown_args[::2]					,   unknown_args[1::2]    )}






def 				SCREAMING_SNAKE_CASE__							(       ):
		SCREAMING_SNAKE_CASE__			=      ArgumentParser(
		    """HuggingFace Datasets CLI tool"""					,   usage="""datasets-cli <command> [<args>]"""					,   allow_abbrev=UpperCamelCase__    )
		SCREAMING_SNAKE_CASE__			=      parser.add_subparsers(help="""datasets-cli command helpers"""    )
		set_verbosity_info()

		# Register commands
		ConvertCommand.register_subcommand(UpperCamelCase__    )
		EnvironmentCommand.register_subcommand(UpperCamelCase__    )
		TestCommand.register_subcommand(UpperCamelCase__    )
		RunBeamCommand.register_subcommand(UpperCamelCase__    )
		DummyDataCommand.register_subcommand(UpperCamelCase__    )

		# Parse args
		SCREAMING_SNAKE_CASE__	,						SCREAMING_SNAKE_CASE__			=      parser.parse_known_args()
		if not hasattr(UpperCamelCase__					,   """func"""    ):
				parser.print_help()
				exit(1    )
		SCREAMING_SNAKE_CASE__			=      parse_unknown_args(UpperCamelCase__    )

		# Run
		SCREAMING_SNAKE_CASE__			=      args.func(UpperCamelCase__					,   **UpperCamelCase__    )
		service.run()


if __name__ == "__main__":
	main()