Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in bert_wordpiece.py in v 0.4 (0.3 OK) #137

Closed
abedkhooli opened this issue Feb 11, 2020 · 2 comments
Closed

Error in bert_wordpiece.py in v 0.4 (0.3 OK) #137

abedkhooli opened this issue Feb 11, 2020 · 2 comments

Comments

@abedkhooli
Copy link

Code that worked in v 0.3 (ex. https://github.com/huggingface/tokenizers/blob/master/bindings/python/examples/train_bert_wordpiece.py) breaks in 0.4 with type error:

/opt/conda/lib/python3.6/site-packages/tokenizers/implementations/bert_wordpiece.py in train(self, files, vocab_size, min_frequency, limit_alphabet, initial_alphabet, special_tokens, show_progress, wordpieces_prefix)
     92         if isinstance(files, str):
     93             files = [files]
---> 94         self._tokenizer.train(trainer, files)

TypeError: 
@n1t0
Copy link
Member

n1t0 commented Feb 11, 2020

Hi @abedkhooli! Thank you for letting us know about this issue. I just released 0.4.2 to fix this.

@n1t0 n1t0 closed this as completed Feb 11, 2020
@HuanhuanZhao08
Copy link

Hello, I have the same error with version 0.12.1

Traceback (most recent call last):
File "/home/huanhuan/Desktop/BERT-MIMIC3-ICD9-master/create_tokenizer.py", line 25, in
tokenizer.train(
File "/home/huanhuan/miniconda3/lib/python3.9/site-packages/tokenizers/implementations/bert_wordpiece.py", line 118, in train
self._tokenizer.train(files, trainer=trainer)
Exception: No such file or directory (os error 2)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants