Repository: facebookresearch/ParlAI

Issue:
Getting error while invoking interactive web CLI
I am receiving the below error while invoking the following command:

**Command:**
`python3.7 -m parlai.scripts.interactive_web --host 0.0.0.0 -m drqa`

**Error:**
```python-traceback
    InteractiveWeb.main()
  File "/Omega/ParlAI/parlai/scripts/script.py", line 79, in main
    return cls._run_args(None)
  File "/Omega/ParlAI/parlai/scripts/script.py", line 66, in _run_args
    return script.run()
  File "/Omega/ParlAI/parlai/scripts/interactive_web.py", line 276, in run
    return interactive_web(self.opt, self.parser)
  File "/Omega/ParlAI/parlai/scripts/interactive_web.py", line 252, in interactive_web
    agent = create_agent(SHARED.get('opt'), requireModelExists=True)
  File "/Omega/ParlAI/parlai/core/agents.py", line 389, in create_agent
    model = model_class(opt)
  File "/Omega/ParlAI/parlai/agents/drqa/drqa.py", line 132, in __init__
    self.word_dict = DrqaAgent.dictionary_class()(opt)
  File "/Omega/ParlAI/parlai/agents/drqa/drqa.py", line 63, in __init__
    super().__init__(*args, **kwargs)
  File "/Omega/ParlAI/parlai/core/dict.py", line 241, in __init__
    'tokenizer type {} not yet supported'.format(self.tokenizer)
AttributeError: tokenizer type spacy not yet supported
(parlai) root@omega:/home/bibhuti_zinbox# python -m parlai.scripts.interactive_web -m drqa
Traceback (most recent call last):
  File "/Omega/ParlAI/parlai/core/dict.py", line 238, in __init__
    self.tokenizer_fun = getattr(self, self.tokenizer + '_tokenize')
AttributeError: 'SimpleDictionaryAgent' object has no attribute 'spacy_tokenize'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.7/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.7/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/Omega/ParlAI/parlai/scripts/interactive_web.py", line 280, in <module>
    InteractiveWeb.main()
  File "/Omega/ParlAI/parlai/scripts/script.py", line 79, in main
    return cls._run_args(None)
  File "/Omega/ParlAI/parlai/scripts/script.py", line 66, in _run_args
    return script.run()
  File "/Omega/ParlAI/parlai/scripts/interactive_web.py", line 276, in run
    return interactive_web(self.opt, self.parser)
  File "/Omega/ParlAI/parlai/scripts/interactive_web.py", line 252, in interactive_web
    agent = create_agent(SHARED.get('opt'), requireModelExists=True)
  File "/Omega/ParlAI/parlai/core/agents.py", line 389, in create_agent
    model = model_class(opt)
  File "/Omega/ParlAI/parlai/agents/drqa/drqa.py", line 132, in __init__
    self.word_dict = DrqaAgent.dictionary_class()(opt)
  File "/Omega/ParlAI/parlai/agents/drqa/drqa.py", line 63, in __init__
    super().__init__(*args, **kwargs)
  File "/Omega/ParlAI/parlai/core/dict.py", line 241, in __init__
    'tokenizer type {} not yet supported'.format(self.tokenizer)
AttributeError: tokenizer type spacy not yet supported
```
**Environment details:**
```
(parlai) root@omega:/home/bibhuti_zinbox# uname -r
4.19.0-9-cloud-amd64

(parlai) root@omega:/home/bibhuti_zinbox# python --version
Python 3.7.3
```

Kindly look into this and help me with the same.


Discussion:
@emilydinan lol
Short term fix: Undo roll back to abe7acb58572f55b7fc01ef560f5896240e9a6cc.
(or just add `--dict-tokenizer re`)
Thanks. This parameter resolved my issue.
Leaving this issue open because we still need to change the default parameter for drqa
This issue has not had activity in 30 days. Please feel free to reopen if you have more issues. You may apply the "never-stale" tag to prevent this from happening.

Resolving patch:
diff --git a/parlai/agents/drqa/drqa.py b/parlai/agents/drqa/drqa.py
--- a/parlai/agents/drqa/drqa.py
+++ b/parlai/agents/drqa/drqa.py
@@ -44,10 +44,6 @@
 
 
 class SimpleDictionaryAgent(DictionaryAgent):
-    """
-    Override DictionaryAgent to use spaCy tokenizer.
-    """
-
     @staticmethod
     def add_cmdline_args(argparser):
         group = DictionaryAgent.add_cmdline_args(argparser)
@@ -57,7 +53,6 @@ def add_cmdline_args(argparser):
             default=True,
             help='Use only words found in provided embedding_file',
         )
-        group.set_defaults(dict_tokenizer='spacy')
 
     def __init__(self, *args, **kwargs):
         super().__init__(*args, **kwargs)


Test patch: