|
|
@ -16,23 +16,23 @@ import argparse
|
|
|
|
|
|
|
|
|
|
|
|
def default_argument_parser():
|
|
|
|
def default_argument_parser():
|
|
|
|
r"""A simple yet genral argument parser for experiments with parakeet.
|
|
|
|
r"""A simple yet genral argument parser for experiments with parakeet.
|
|
|
|
|
|
|
|
|
|
|
|
This is used in examples with parakeet. And it is intended to be used by
|
|
|
|
This is used in examples with parakeet. And it is intended to be used by
|
|
|
|
other experiments with parakeet. It requires a minimal set of command line
|
|
|
|
other experiments with parakeet. It requires a minimal set of command line
|
|
|
|
arguments to start a training script.
|
|
|
|
arguments to start a training script.
|
|
|
|
|
|
|
|
|
|
|
|
The ``--config`` and ``--opts`` are used for overwrite the deault
|
|
|
|
The ``--config`` and ``--opts`` are used for overwrite the deault
|
|
|
|
configuration.
|
|
|
|
configuration.
|
|
|
|
|
|
|
|
|
|
|
|
The ``--data`` and ``--output`` specifies the data path and output path.
|
|
|
|
The ``--data`` and ``--output`` specifies the data path and output path.
|
|
|
|
Resuming training from existing progress at the output directory is the
|
|
|
|
Resuming training from existing progress at the output directory is the
|
|
|
|
intended default behavior.
|
|
|
|
intended default behavior.
|
|
|
|
|
|
|
|
|
|
|
|
The ``--checkpoint_path`` specifies the checkpoint to load from.
|
|
|
|
The ``--checkpoint_path`` specifies the checkpoint to load from.
|
|
|
|
|
|
|
|
|
|
|
|
The ``--device`` and ``--nprocs`` specifies how to run the training.
|
|
|
|
The ``--device`` and ``--nprocs`` specifies how to run the training.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
See Also
|
|
|
|
See Also
|
|
|
|
--------
|
|
|
|
--------
|
|
|
|
parakeet.training.experiment
|
|
|
|
parakeet.training.experiment
|
|
|
@ -53,10 +53,10 @@ def default_argument_parser():
|
|
|
|
# load from saved checkpoint
|
|
|
|
# load from saved checkpoint
|
|
|
|
parser.add_argument("--checkpoint_path", type=str, help="path of the checkpoint to load")
|
|
|
|
parser.add_argument("--checkpoint_path", type=str, help="path of the checkpoint to load")
|
|
|
|
|
|
|
|
|
|
|
|
# save jit model to
|
|
|
|
# save jit model to
|
|
|
|
parser.add_argument("--export_path", type=str, help="path of the jit model to save")
|
|
|
|
parser.add_argument("--export_path", type=str, help="path of the jit model to save")
|
|
|
|
|
|
|
|
|
|
|
|
# save asr result to
|
|
|
|
# save asr result to
|
|
|
|
parser.add_argument("--result_file", type=str, help="path of save the asr result")
|
|
|
|
parser.add_argument("--result_file", type=str, help="path of save the asr result")
|
|
|
|
|
|
|
|
|
|
|
|
# running
|
|
|
|
# running
|
|
|
@ -65,10 +65,13 @@ def default_argument_parser():
|
|
|
|
parser.add_argument("--nprocs", type=int, default=1, help="number of parallel processes to use.")
|
|
|
|
parser.add_argument("--nprocs", type=int, default=1, help="number of parallel processes to use.")
|
|
|
|
|
|
|
|
|
|
|
|
# overwrite extra config and default config
|
|
|
|
# overwrite extra config and default config
|
|
|
|
# parser.add_argument("--opts", nargs=argparse.REMAINDER,
|
|
|
|
# parser.add_argument("--opts", nargs=argparse.REMAINDER,
|
|
|
|
# help="options to overwrite --config file and the default config, passing in KEY VALUE pairs")
|
|
|
|
# help="options to overwrite --config file and the default config, passing in KEY VALUE pairs")
|
|
|
|
parser.add_argument("--opts", type=str, default=[], nargs='+',
|
|
|
|
parser.add_argument("--opts", type=str, default=[], nargs='+',
|
|
|
|
help="options to overwrite --config file and the default config, passing in KEY VALUE pairs")
|
|
|
|
help="options to overwrite --config file and the default config, passing in KEY VALUE pairs")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
parser.add_argument("--seed", type=int, default=None,
|
|
|
|
|
|
|
|
help="seed to use for paddle, np and random. The default value is None")
|
|
|
|
# yapd: enable
|
|
|
|
# yapd: enable
|
|
|
|
|
|
|
|
|
|
|
|
return parser
|
|
|
|
return parser
|
|
|
|