Closed qAp closed 2 years ago
In _setup_parser, the parser picks up arguments from the default data_class, which is MNIST.
_setup_parser
data_class
MNIST
EMNISTLines has additional arguments like max_length and max_overlap.
EMNISTLines
max_length
max_overlap
But because
parser = _setup_parser()
is called before
args = parser.parse_args()
, how does
python run_experiment --data_class EMNISTLines --max_length 19 --max_overlap 4
not fail? Doesn't the parser lack the arguments max_length and max_overlap, because only MNIST.add_to_argparse, and not EMNISTLines.add_to_argparse, has been called?
MNIST.add_to_argparse
EMNISTLines.add_to_argparse
Please help me understand...
ok, _setup_parser doesn't work as expected if called directly inside an interactive environment like a notebook, but called inside a script it's fine.
In
_setup_parser
, the parser picks up arguments from the defaultdata_class
, which isMNIST
.EMNISTLines
has additional arguments likemax_length
andmax_overlap
.But because
is called before
, how does
not fail? Doesn't the parser lack the arguments
max_length
andmax_overlap
, because onlyMNIST.add_to_argparse
, and notEMNISTLines.add_to_argparse
, has been called?Please help me understand...