lebrice / SimpleParsing

Simple, Elegant, Typed Argument Parsing with argparse
MIT License
384 stars 46 forks source link

Excessive logging at the INFO level #307

Open andrey-klochkov-liftoff opened 4 months ago

andrey-klochkov-liftoff commented 4 months ago

Most of the time I configure Python logging to be at the INFO level by default but simple_parsing prints a lot of logs at the INFO level that look more like debugging logs, see an example below. Can we switch these to be at the DEBUG level?

2024/02/15 00:20:40 [stdout] 2024-02-15 00:20:40.720 INFO dataclass_wrapper - add_arguments: group.add_argument(*['--dataset_path'], **{'required': True, 'dest': 'config.dataset_path', 'default': None, 'help': 'Dataset location (directory name or S3 path).', 'type': <class 'str'>})
2024/02/15 00:20:40 [stdout] 2024-02-15 00:20:40.721 INFO dataclass_wrapper - add_arguments: group.add_argument(*['--shuffle_files'], **{'required': False, 'dest': 'config.shuffle_files', 'default': False, 'metavar': 'bool', 'help': 'Shuffle training dataset files.', 'action': <class 'simple_parsing.helpers.custom_actions.BooleanOptionalAction'>, '_conflict_prefix': ''})
...
2024/02/15 00:20:40 [stdout] 2024-02-15 00:20:40.732 INFO parsing - _instantiate_dataclasses: Instantiating the wrapper with destinations ['config.model']
2024/02/15 00:20:40 [stdout] 2024-02-15 00:20:40.732 INFO parsing - _instantiate_dataclasses: Instantiating the dataclass at destination config.model
lebrice commented 4 months ago

Hey there, yes, sure thing! I'd welcome a PR for this if you're up for it, otherwise I might do this next week.