You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
example code:
from dataclasses import dataclass, field
from argparse_dataclass import ArgumentParser
from argparse import ArgumentDefaultsHelpFormatter
@dataclass
class FineParams:
batch_size: int = field(default=300)
parser = ArgumentParser(GCPFineParams, formatter_class=ArgumentDefaultsHelpFormatter)
params: FineParams = parser.parse_args()
resulting non-defaults help printout.
diving into argparse code (argparse.py, ver 1.1, line 1861) shone that the ArgumentParser's _actions class members, batch_size action is stored as _StoreAction(option_strings=['--batch-size'], dest='batch_size', nargs=None, const=None, default=<dataclasses._MISSING_TYPE object at 0x7f8465889960>, type=<class 'int'>, choices=None, required=False, help=None, metavar=None)
The text was updated successfully, but these errors were encountered:
example code:
from dataclasses import dataclass, field
from argparse_dataclass import ArgumentParser
from argparse import ArgumentDefaultsHelpFormatter
resulting non-defaults help printout.
diving into argparse code (argparse.py, ver 1.1, line 1861) shone that the ArgumentParser's
_actions
class members,batch_size
action is stored as_StoreAction(option_strings=['--batch-size'], dest='batch_size', nargs=None, const=None, default=<dataclasses._MISSING_TYPE object at 0x7f8465889960>, type=<class 'int'>, choices=None, required=False, help=None, metavar=None)
The text was updated successfully, but these errors were encountered: