def create_argument_parser(): parser = argparse.ArgumentParser( description='train a custom language parser') parser.add_argument('-o', '--path', default="models/nlu/", help="Path where model files will be saved") group = parser.add_mutually_exclusive_group(required=True) group.add_argument('-d', '--data', default=None, help="Location of the training data. For JSON and " "markdown data, this can either be a single file " "or a directory containing multiple training " "data files.") group.add_argument('-u', '--url', default=None, help="URL from which to retrieve training data.") group.add_argument('--endpoints', default=None, help="EndpointConfig defining the server from which " "pull training data.") parser.add_argument('-c', '--config', required=True, help="Rasa NLU configuration file") parser.add_argument('-t', '--num_threads', default=1, type=int, help="Number of threads to use during model training") parser.add_argument('--project', default=None, help="Project this model belongs to.") parser.add_argument('--fixed_model_name', help="If present, a model will always be persisted " "in the specified directory instead of creating " "a folder like 'model_20171020-160213'") parser.add_argument( '--storage', help='Set the remote location where models are stored. ' 'E.g. on AWS. If nothing is configured, the ' 'server will only serve the models that are ' 'on disk in the configured `path`.') utils.add_logging_option_arguments(parser) return parser
def create_argument_parser(): import argparse parser = argparse.ArgumentParser( description='evaluate a Rasa NLU pipeline with cross ' 'validation or on external data') utils.add_logging_option_arguments(parser, default=logging.INFO) _add_arguments(parser) return parser
def create_argument_parser(): import argparse parser = argparse.ArgumentParser( description='run a Rasa NLU model locally on the command line ' 'for manual testing') parser.add_argument('-m', '--model', required=True, help="path to model") utils.add_logging_option_arguments(parser, default=logging.INFO) return parser
def create_argument_parser(): parser = argparse.ArgumentParser(description='parse incoming text') cli.add_server_arguments(parser) utils.add_logging_option_arguments(parser) return parser