huggingface / huggingface/transfer-learning-conv-ai
Changing from gpt to gpt2
- Dominant language
- Python
- Stars
- 1.8k
- Forks
- 430
- PR merge metrics
- No merged PRs in 30d
Description
I get an error when I change from gpt to gpt2 in the interactive.py file.
However, when I change from gpt to gpt2 in the train.py file, everything is fine.
The error I get:
File "/transfer-learning-conv-ai/interact.py", line 130, in run
logger.info("Selected personality: %s", tokenizer.decode(chain(*personality)))
File "/pytorch_transformers/tokenization_utils.py", line 767, in decode
sub_texts.append(self.convert_tokens_to_string(current_sub_text))
File "/pytorch_transformers/tokenization_gpt2.py", line 198, in convert_tokens_to_string
text = ''.join(tokens)
TypeError: sequence item 0: expected str instance, NoneType found
I also tried to switch from pytorch-transformer to the new transformers library to no avail.
Contributor guide
No contributing guide indexed for this repository
Research direction
Compare the GPT and GPT-2 paths in interactive.py and train.py, then trace the failure from interact.py line 130 into pytorch_transformers/tokenization_utils.py and tokenization_gpt2.py. Reproduce the interactive GPT-2 run and confirm it completes without the NoneType decoding error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100