allennlp.commands.trainΒΆ

The train subcommand can be used to train a model. It requires a configuration file and a directory in which to write the results.

$ allennlp train --help
usage: allennlp train [-h] -s SERIALIZATION_DIR
                           [-o OVERRIDES]
                           [--include-package INCLUDE_PACKAGE]
                           [--file-friendly-logging]
                           param_path

Train the specified model on the specified dataset.

positional arguments:
param_path            path to parameter file describing the model to be
                        trained

optional arguments:
-h, --help            show this help message and exit
-s SERIALIZATION_DIR, --serialization-dir SERIALIZATION_DIR
                        directory in which to save the model and its logs
-o OVERRIDES, --overrides OVERRIDES
                        a HOCON structure used to override the experiment
                        configuration
--include-package INCLUDE_PACKAGE
                        additional packages to include
--file-friendly-logging
                        outputs tqdm status on separate lines and slows tqdm
                        refresh rate