VinAIResearch / MISCA

MISCA: A Joint Model for Multiple Intent Detection and Slot Filling with Intent-Slot Co-Attention (EMNLP 2023 - Findings)
GNU Affero General Public License v3.0
18 stars 3 forks source link

predict.py line 29 missing slot_hier, and missing 2 required positional arguments #7

Closed tmrnvcome closed 3 months ago

tmrnvcome commented 4 months ago

Hi, can I check if line 29 of predict.py has a missing attribute?

Also, when i try to run predict.py with this command python predict.py --input_file ./data/sample_pred_in.txt --output_file ./data/sample_pred_out.txt --model_dir ./dir_newmodel_3

i get this error TypeError: JointRoberta.forward() missing 2 required positional arguments: 'heads' and 'seq_lens'

thinhphp commented 3 months ago

Hi, we have updated the predict.py file. You should set hyper-parameters the same as training, and have the checkpoint file (model.bin) in model_dir argument.