|
|
@ -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
|
|
|
@ -58,10 +58,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
|
|
|
|