monologg / JointBERT

Pytorch implementation of JointBERT: "BERT for Joint Intent Classification and Slot Filling"
Apache License 2.0
662 stars 186 forks source link

Exception: Some model files might be missing... #5

Closed saharghannay closed 4 years ago

saharghannay commented 4 years ago

Hi I got this error when training this model for ATIS : python3 main.py --task atis --num_train_epochs 10 --model_type bert --model_dir atis_model --do_train --do_eval --use_crf

do you have an idea how can I solve this problem please ?

INFO - transformers.modeling_utils - loading weights file atis_model/pytorch_model.bin Traceback (most recent call last): File "tools/git/JointBERT/trainer.py", line 233, in load_model self.model = self.model_class.from_pretrained(self.args.model_dir) File "miniconda2/envs/condpy36/lib/python3.6/site-packages/transformers/modeling_utils.py", line 512, in from_pretrained model = cls(config, *model_args, **model_kwargs) TypeError: init() missing 3 required positional arguments: 'args', 'intent_label_lst', and 'slot_label_lst'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "main.py", line 71, in main(args) File "main.py", line 22, in main trainer.load_model() File "tools/git/JointBERT/trainer.py", line 237, in load_model raise Exception("Some model files might be missing...") Exception: Some model files might be missing... Exception: Some model files might be missing...

monologg commented 4 years ago

I'm sorry that recent commit makes this bug. I'll fix it soon (It won't take that long) and add new commit! Thank you for reporting the bug:)

monologg commented 4 years ago

@saharghannay I've pushed the new commit:) Can you check this one?

saharghannay commented 4 years ago

Yes, Thank you.