paddlespeech.s2t.training.cli module

class paddlespeech.s2t.training.cli.ExtendAction(option_strings, dest, nargs=None, const=None, default=None, type=None, choices=None, required=False, help=None, metavar=None)[source]

Bases: Action

[Since Python 3.8, the "extend" is available directly in stdlib] (https://docs.python.org/3.8/library/argparse.html#action). If you only have to support 3.8+ then defining it yourself is no longer required. Usage of stdlib "extend" action is exactly the same way as this answer originally described:

Methods

__call__(parser, namespace, values[, ...])

Call self as a function.

class paddlespeech.s2t.training.cli.LoadFromFile(option_strings, dest, nargs=None, const=None, default=None, type=None, choices=None, required=False, help=None, metavar=None)[source]

Bases: Action

Methods

__call__(parser, namespace, values[, ...])

Call self as a function.

paddlespeech.s2t.training.cli.config_from_args(args)[source]
paddlespeech.s2t.training.cli.default_argument_parser(parser=None)[source]

A simple yet genral argument parser for experiments with t2s.

This is used in examples with t2s. And it is intended to be used by other experiments with t2s. It requires a minimal set of command line arguments to start a training script.

The --config and --opts are used for overwrite the deault configuration.

The --data and --output specifies the data path and output path. Resuming training from existing progress at the output directory is the intended default behavior.

The --checkpoint_path specifies the checkpoint to load from.

The --ngpu specifies how to run the training.

See also

paddlespeech.t2s.training.experiment
Returns
-------
argparse.ArgumentParser

the parser

paddlespeech.s2t.training.cli.maybe_dump_config(dump_path, config)[source]