BioGPT icon indicating copy to clipboard operation
BioGPT copied to clipboard

Assertionerror

Open parthplc opened this issue 2 years ago • 3 comments

Hey @renqianluo , I was still facing the same issue.

Originally posted by @parthplc in https://github.com/microsoft/BioGPT/issues/10#issuecomment-1385790515

parthplc avatar Jan 23 '23 16:01 parthplc

Same here. I installed all dependencies as specified in the README but couldn't make it work. I investigated a little and it seems like the task name "language_modeling_prompt" is not part of the TASK_REGISTRY variable in fairseq/tasks/init.py resulting in an AssertionError.

burgshrimps avatar Jan 27 '23 15:01 burgshrimps

I figured out the solution to this and #10. To run the fine-tuned models, import TransformerLanguageModelPrompt from the src.transformer_lm_prompt script instead of using TransformerLanguageModel from fairseq.models.transformer_lm.

AdirthaBorgohain avatar Feb 01 '23 12:02 AdirthaBorgohain

If you run the scripts, the src is passed to the program via the --user-dir parameter, which contains the language_modeling_prompt task. If you use it in our own code, please from src.transfromer_lm_prompt import TransformerLanguageModelPrompt

renqianluo avatar Feb 03 '23 12:02 renqianluo