[go: up one dir, main page]

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

Fine tuning Elmolstmchecker ends up giving error #75

Open
hunaidkhan2000 opened this issue Aug 4, 2022 · 1 comment
Open

Fine tuning Elmolstmchecker ends up giving error #75

hunaidkhan2000 opened this issue Aug 4, 2022 · 1 comment

Comments

@hunaidkhan2000
Copy link

Hi team,
i have used the code provided in the repository to finetune the elmo model but i am getting the weird error every time i am trying to do it

my code is

from neuspell import ElmosclstmChecker

checker = ElmosclstmChecker()
checker.from_pretrained()
checker.finetune(clean_file="clean.txt", corrupt_file="corrupt.txt", data_dir="default")

i have also tried using

from neuspell import ElmosclstmChecker

checker = ElmosclstmChecker()
checker.from_pretrained(r".\neuspell\data\\checkpoints\\elmoscrnn-probwordnoise")
checker.finetune(clean_file="clean.txt", corrupt_file="corrupt.txt", data_dir="default")

Error which i am getting is AttributeError: 'ElmosclstmChecker' object has no attribute 'bert_pretrained_name_or_path'

@Jeremyzzzz
Copy link

I had the same issue and I solved it by adding self.bert_pretrained_name_or_path = "bert-base-cased" in the __init__ function of ElmosclstmChecker class in corrector_elmosclstm.py. It just needs the name to create the output folder which is the name of the Bert model so it can save it to the correct folder.

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

2 participants