notice
This is documentation for Rasa Documentation v2.x, which is no longer actively maintained.
For up-to-date documentation, see the latest version (3.x).
Version: 2.x
rasa.cli.train
add_subparser
add_subparser(subparsers: SubParsersAction, parents: List[argparse.ArgumentParser]) -> None
Add all training parsers.
Arguments:
subparsers
- subparser we are going to attach toparents
- Parent parsers, needed to ensure tree structure in argparse
run_training
run_training(args: argparse.Namespace, can_exit: bool = False) -> Optional[Text]
Trains a model.
Arguments:
args
- Namespace arguments.can_exit
- IfTrue
, the operation can sendsys.exit
in the case training was not successful.
Returns:
Path to a trained model or None
if training was not successful.
run_core_training
run_core_training(args: argparse.Namespace, train_path: Optional[Text] = None) -> Optional[Text]
Trains a Rasa Core model only.
Arguments:
args
- Command-line arguments to configure training.train_path
- Path where trained model but not unzipped model should be stored.
Returns:
Path to a trained model or None
if training was not successful.
run_nlu_training
run_nlu_training(args: argparse.Namespace, train_path: Optional[Text] = None) -> Optional[Text]
Trains an NLU model.
Arguments:
args
- Namespace arguments.train_path
- Directory where models should be stored.
Returns:
Path to a trained model or None
if training was not successful.