Repository: pytorch/benchmark
Issue: [Cleanup] Python warning messages in torchbench

Observed the following Python warnings when running `pytest test_bench.py --collect-only --ignore_machine_config` (python 3.8.5). Better clean these up

```
torchbenchmark/models/fastNLP/fastNLP/io/pipe/cws.py:125
  /home/pengwu/projects/pytorch-benchmark/benchmark/torchbenchmark/models/fastNLP/fastNLP/io/pipe/cws.py:125: DeprecationWarning: invalid escape sequence \d
    pattern = '\d[\d\\.﹒·]*(?=[\u4e00-\u9fff  ，％%,。！<－“])'

torchbenchmark/models/fastNLP/fastNLP/modules/tokenizer/gpt2_tokenizer.py:93
  /home/pengwu/projects/pytorch-benchmark/benchmark/torchbenchmark/models/fastNLP/fastNLP/modules/tokenizer/gpt2_tokenizer.py:93: SyntaxWarning: "is" with a literal. Did you mean "=="?
    if text is '':

torchbenchmark/models/maml/learner.py:32
  /home/pengwu/projects/pytorch-benchmark/benchmark/torchbenchmark/models/maml/learner.py:32: SyntaxWarning: "is" with a literal. Did you mean "=="?
    if name is 'conv2d':

torchbenchmark/models/maml/learner.py:41
  /home/pengwu/projects/pytorch-benchmark/benchmark/torchbenchmark/models/maml/learner.py:41: SyntaxWarning: "is" with a literal. Did you mean "=="?
    elif name is 'convt2d':

torchbenchmark/models/maml/learner.py:50
  /home/pengwu/projects/pytorch-benchmark/benchmark/torchbenchmark/models/maml/learner.py:50: SyntaxWarning: "is" with a literal. Did you mean "=="?
    elif name is 'linear':

torchbenchmark/models/maml/learner.py:59
  /home/pengwu/projects/pytorch-benchmark/benchmark/torchbenchmark/models/maml/learner.py:59: SyntaxWarning: "is" with a literal. Did you mean "=="?
    elif name is 'bn':

torchbenchmark/models/maml/learner.py:87
  /home/pengwu/projects/pytorch-benchmark/benchmark/torchbenchmark/models/maml/learner.py:87: SyntaxWarning: "is" with a literal. Did you mean "=="?
    if name is 'conv2d':

torchbenchmark/models/maml/learner.py:92
  /home/pengwu/projects/pytorch-benchmark/benchmark/torchbenchmark/models/maml/learner.py:92: SyntaxWarning: "is" with a literal. Did you mean "=="?
    elif name is 'convt2d':

torchbenchmark/models/maml/learner.py:97
  /home/pengwu/projects/pytorch-benchmark/benchmark/torchbenchmark/models/maml/learner.py:97: SyntaxWarning: "is" with a literal. Did you mean "=="?
    elif name is 'linear':

torchbenchmark/models/maml/learner.py:101
  /home/pengwu/projects/pytorch-benchmark/benchmark/torchbenchmark/models/maml/learner.py:101: SyntaxWarning: "is" with a literal. Did you mean "=="?
    elif name is 'leakyrelu':

torchbenchmark/models/maml/learner.py:106
  /home/pengwu/projects/pytorch-benchmark/benchmark/torchbenchmark/models/maml/learner.py:106: SyntaxWarning: "is" with a literal. Did you mean "=="?
    elif name is 'avg_pool2d':

torchbenchmark/models/maml/learner.py:109
  /home/pengwu/projects/pytorch-benchmark/benchmark/torchbenchmark/models/maml/learner.py:109: SyntaxWarning: "is" with a literal. Did you mean "=="?
    elif name is 'max_pool2d':

torchbenchmark/models/maml/learner.py:141
  /home/pengwu/projects/pytorch-benchmark/benchmark/torchbenchmark/models/maml/learner.py:141: SyntaxWarning: "is" with a literal. Did you mean "=="?
    if name is 'conv2d':

torchbenchmark/models/maml/learner.py:147
  /home/pengwu/projects/pytorch-benchmark/benchmark/torchbenchmark/models/maml/learner.py:147: SyntaxWarning: "is" with a literal. Did you mean "=="?
    elif name is 'convt2d':

torchbenchmark/models/maml/learner.py:153
  /home/pengwu/projects/pytorch-benchmark/benchmark/torchbenchmark/models/maml/learner.py:153: SyntaxWarning: "is" with a literal. Did you mean "=="?
    elif name is 'linear':

torchbenchmark/models/maml/learner.py:158
  /home/pengwu/projects/pytorch-benchmark/benchmark/torchbenchmark/models/maml/learner.py:158: SyntaxWarning: "is" with a literal. Did you mean "=="?
    elif name is 'bn':

torchbenchmark/models/maml/learner.py:165
  /home/pengwu/projects/pytorch-benchmark/benchmark/torchbenchmark/models/maml/learner.py:165: SyntaxWarning: "is" with a literal. Did you mean "=="?
    elif name is 'flatten':

torchbenchmark/models/maml/learner.py:168
  /home/pengwu/projects/pytorch-benchmark/benchmark/torchbenchmark/models/maml/learner.py:168: SyntaxWarning: "is" with a literal. Did you mean "=="?
    elif name is 'reshape':

torchbenchmark/models/maml/learner.py:171
  /home/pengwu/projects/pytorch-benchmark/benchmark/torchbenchmark/models/maml/learner.py:171: SyntaxWarning: "is" with a literal. Did you mean "=="?
    elif name is 'relu':

torchbenchmark/models/maml/learner.py:173
  /home/pengwu/projects/pytorch-benchmark/benchmark/torchbenchmark/models/maml/learner.py:173: SyntaxWarning: "is" with a literal. Did you mean "=="?
    elif name is 'leakyrelu':

torchbenchmark/models/maml/learner.py:175
  /home/pengwu/projects/pytorch-benchmark/benchmark/torchbenchmark/models/maml/learner.py:175: SyntaxWarning: "is" with a literal. Did you mean "=="?
    elif name is 'tanh':

torchbenchmark/models/maml/learner.py:177
  /home/pengwu/projects/pytorch-benchmark/benchmark/torchbenchmark/models/maml/learner.py:177: SyntaxWarning: "is" with a literal. Did you mean "=="?
    elif name is 'sigmoid':

torchbenchmark/models/maml/learner.py:179
  /home/pengwu/projects/pytorch-benchmark/benchmark/torchbenchmark/models/maml/learner.py:179: SyntaxWarning: "is" with a literal. Did you mean "=="?
    elif name is 'upsample':

torchbenchmark/models/maml/learner.py:181
  /home/pengwu/projects/pytorch-benchmark/benchmark/torchbenchmark/models/maml/learner.py:181: SyntaxWarning: "is" with a literal. Did you mean "=="?
    elif name is 'max_pool2d':

torchbenchmark/models/maml/learner.py:183
  /home/pengwu/projects/pytorch-benchmark/benchmark/torchbenchmark/models/maml/learner.py:183: SyntaxWarning: "is" with a literal. Did you mean "=="?
    elif name is 'avg_pool2d':

../../../local/miniconda3/envs/pytorch/lib/python3.8/site-packages/librosa/cache.py:49: 41 warnings
  /home/pengwu/local/miniconda3/envs/pytorch/lib/python3.8/site-packages/librosa/cache.py:49: DeprecationWarning: The 'cachedir' attribute has been deprecated in version 0.12 and will be removed in version 0.14.
  Use os.path.join(memory.location, 'joblib') attribute instead.
    if self.cachedir is not None and self.level >= level:

torchbenchmark/models/tacotron2/text/__init__.py:74
torchbenchmark/models/tacotron2/text/__init__.py:74
  /home/pengwu/projects/pytorch-benchmark/benchmark/torchbenchmark/models/tacotron2/text/__init__.py:74: SyntaxWarning: "is not" with a literal. Did you mean "!="?
    return s in _symbol_to_id and s is not '_' and s is not '~'

-- Docs: https://docs.pytest.org/en/stable/warnings.html
```