Repository: Lightning-AI/pytorch-lightning

Issue:
Escaping % in add_default_args
**Describe the bug**

In utilities/arg_parse.py, a percentage symbol is not escaped and would cause an error when printing help information.

```python
parser.add_argument('--overfit', default=-1, type=float,
                        help='% of dataset to use with this option. float, or -1 for none')
```

**To Reproduce**
Steps to reproduce the behavior:
```
import os
import random
import sys
from pytorch_lightning.utilities.arg_parse import add_default_args
from test_tube import HyperOptArgumentParser, Experiment

if __name__ == "__main__":
    root_dir = os.path.split(os.path.dirname(sys.modules['__main__'].__file__))[0]
    parent_parser = HyperOptArgumentParser(strategy='random_search', add_help=True)
    add_default_args(parent_parser, root_dir)
    hyperparams = parent_parser.parse_args()
```
Execute the file with `--help`

```
python temp.py --help
```

Throws an error:
```
WARNING:root:This caffe2 python run does not have GPU support. Will run in CPU only mode.
Traceback (most recent call last):
  File "/Users/chenghaomou/Code/ai2/temp.py", line 11, in <module>
    hyperparams = parent_parser.parse_args()
  File "/Users/chenghaomou/Anaconda/envs/Elisa/lib/python3.7/site-packages/test_tube/argparse_hopt.py", line 238, in parse_args
    results = self.__parse_args(args, namespace)
  File "/Users/chenghaomou/Anaconda/envs/Elisa/lib/python3.7/site-packages/test_tube/argparse_hopt.py", line 157, in __parse_args
    args, argv = self.parse_known_args(args, namespace)
  File "/Users/chenghaomou/Anaconda/envs/Elisa/lib/python3.7/argparse.py", line 1782, in parse_known_args
    namespace, args = self._parse_known_args(args, namespace)
  File "/Users/chenghaomou/Anaconda/envs/Elisa/lib/python3.7/argparse.py", line 1988, in _parse_known_args
    start_index = consume_optional(start_index)
  File "/Users/chenghaomou/Anaconda/envs/Elisa/lib/python3.7/argparse.py", line 1928, in consume_optional
    take_action(action, args, option_string)
  File "/Users/chenghaomou/Anaconda/envs/Elisa/lib/python3.7/argparse.py", line 1856, in take_action
    action(self, namespace, argument_values, option_string)
  File "/Users/chenghaomou/Anaconda/envs/Elisa/lib/python3.7/argparse.py", line 1038, in __call__
    parser.print_help()
  File "/Users/chenghaomou/Anaconda/envs/Elisa/lib/python3.7/argparse.py", line 2475, in print_help
    self._print_message(self.format_help(), file)
  File "/Users/chenghaomou/Anaconda/envs/Elisa/lib/python3.7/argparse.py", line 2459, in format_help
    return formatter.format_help()
  File "/Users/chenghaomou/Anaconda/envs/Elisa/lib/python3.7/argparse.py", line 284, in format_help
    help = self._root_section.format_help()
  File "/Users/chenghaomou/Anaconda/envs/Elisa/lib/python3.7/argparse.py", line 215, in format_help
    item_help = join([func(*args) for func, args in self.items])
  File "/Users/chenghaomou/Anaconda/envs/Elisa/lib/python3.7/argparse.py", line 215, in <listcomp>
    item_help = join([func(*args) for func, args in self.items])
  File "/Users/chenghaomou/Anaconda/envs/Elisa/lib/python3.7/argparse.py", line 215, in format_help
    item_help = join([func(*args) for func, args in self.items])
  File "/Users/chenghaomou/Anaconda/envs/Elisa/lib/python3.7/argparse.py", line 215, in <listcomp>
    item_help = join([func(*args) for func, args in self.items])
  File "/Users/chenghaomou/Anaconda/envs/Elisa/lib/python3.7/argparse.py", line 525, in _format_action
    help_text = self._expand_help(action)
  File "/Users/chenghaomou/Anaconda/envs/Elisa/lib/python3.7/argparse.py", line 615, in _expand_help
    return self._get_help_string(action) % params
TypeError: %o format: an integer is required, not dict
```


**Expected behavior**
Escape the percentage sign and help can be printed. 


**Desktop (please complete the following information):**
 - OS: macOS 10.15
 - Browser Chrome
 - Version 78.0.3904.87

**Additional context**
Add any other context about the problem here.



Discussion:

Resolving patch:
diff --git a/pytorch_lightning/utilities/arg_parse.py b/pytorch_lightning/utilities/arg_parse.py
--- a/pytorch_lightning/utilities/arg_parse.py
+++ b/pytorch_lightning/utilities/arg_parse.py
@@ -81,7 +81,7 @@ def add_default_args(parser, root_dir, rand_seed=None, possible_model_names=None
     parser.add_argument('--enable_tqdm', dest='enable_tqdm', default=False, action='store_true',
                         help='false removes the progress bar')
     parser.add_argument('--overfit', default=-1, type=float,
-                        help='% of dataset to use with this option. float, or -1 for none')
+                        help='%% of dataset to use with this option. float, or -1 for none')
 
     # debug args
     if rand_seed is not None:


Test patch: