SivilTaram / Persona-Dialogue-Generation

The code of ACL 2020 paper "You Impress Me: Dialogue Generation via Mutual Persona Perception"
MIT License
309 stars 46 forks source link

Error when running interactive.py #26

Closed baljit92 closed 3 years ago

baljit92 commented 3 years ago

Hi,

First of all, thank you very much for creating this repository. I believe this will be very useful to my current conversational project.

However, I'm trying to run the interactive.py to test the current pre-trained model but I get the following error


[ Loading existing model params from <path>/Persona-Dialogue-Generation/data/models/convai2/kvmemnn/model ]
Dictionary: loading dictionary from <path>/Persona-Dialogue-Generation/data/models/convai2/kvmemnn/model.dict
[ num words =  19153 ]

Model name 'openai-gpt' was not found in model name list (openai-gpt). We assumed 'openai-gpt' was a path or url but couldn't find files https://s3.amazonaws.com/models.huggingface.co/bert/openai-gpt-vocab.json and https://s3.amazonaws.com/models.huggingface.co/bert/openai-gpt-merges.txt at this path or url.
Traceback (most recent call last):
  File "interactive.py", line 141, in <module>
    interactive(parser.parse_args(print_args=False), print_parser=parser)
  File "interactive.py", line 64, in interactive
    agent = create_agent(opt, requireModelExists=True)
  File "<path>/Persona-Dialogue-Generation/parlai/core/agents.py", line 547, in create_agent
    model = load_agent_module(opt)
  File "<path>/Persona-Dialogue-Generation/parlai/core/agents.py", line 424, in load_agent_module
    return model_class(new_opt)
  File "<path>/Persona-Dialogue-Generation/agents/transmitter/transmitter.py", line 324, in __init__
    self.dict = self.dictionary_class()(opt)
  File "<path>/Persona-Dialogue-Generation/agents/common/gpt_dictionary.py", line 70, in __init__
    self.start_idx = self.tokenizer.convert_tokens_to_ids([SpecialToken.start])[0]
AttributeError: 'NoneType' object has no attribute 'convert_tokens_to_ids

I have followed the instructions mentioned in Custom Dependencies to setup the environment.

Is there anything else I'm missing?

I'm using Python 3.7 on an Ubuntu environment.

SivilTaram commented 3 years ago

@baljit92 According to the message, I guess the install of transformer is not correct. Could you double-check that it is installed correctly?

SivilTaram commented 3 years ago

If there is any problem, pls feel free to re-open it.

DanielBeck93 commented 3 years ago

@baljit92 , Did you solve this problem?