You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 3, 2023. It is now read-only.
Bug description
I'm trying to fine-tune the FiD model in ParlAI with QuAC following the code from official document. https://parl.ai/projects/hallucination/
However, it keeps showing that ParlaiT5Decoder.init() got an unexpected keyword argument 'dictionary'.
It seems like there is a change in the T5 decoder. How to deal with this issue?
I make a little change to the code
parlai train_model --model fid --task quac
--gpu 0
--rag-retriever-type dpr
--query-model bert_from_parlai_rag
--dpr-model-file zoo:hallucination/bart_rag_token/model
--generation-model t5 --t5-model-arch t5-small
--batchsize 16 --fp16 True --gradient-clip 0.1 --label-truncate 128
--log-every-n-secs 30 --lr-scheduler reduceonplateau --lr-scheduler-patience 1
--model-parallel True --optimizer adam --text-truncate 512 --truncate 512
--learningrate 1e-05 --validation-metric-mode min --validation-every-n-epochs 0.25
--validation-max-exs 1000 --validation-metric ppl --validation-patience 5
--model-file /home/cklo/RAGProject/FiD_wParlAI/pretrained_model
Logs
Traceback (most recent call last):
File "/home/cklo/.local/bin/parlai", line 8, in
sys.exit(main())
File "/home/cklo/.local/lib/python3.10/site-packages/parlai/main.py", line 14, in main
superscript_main()
File "/home/cklo/.local/lib/python3.10/site-packages/parlai/core/script.py", line 325, in superscript_main
return SCRIPT_REGISTRY[cmd].klass._run_from_parser_and_opt(opt, parser)
File "/home/cklo/.local/lib/python3.10/site-packages/parlai/core/script.py", line 108, in _run_from_parser_and_opt
return script.run()
File "/home/cklo/.local/lib/python3.10/site-packages/parlai/scripts/train_model.py", line 1082, in run
self.train_loop = TrainLoop(self.opt)
File "/home/cklo/.local/lib/python3.10/site-packages/parlai/scripts/train_model.py", line 380, in init
self.agent = create_agent(opt)
File "/home/cklo/.local/lib/python3.10/site-packages/parlai/core/agents.py", line 479, in create_agent
model = model_class(opt)
File "/home/cklo/.local/lib/python3.10/site-packages/parlai/agents/rag/rag.py", line 186, in init
self._generation_agent.init(self, opt, shared) # type: ignore
File "/home/cklo/.local/lib/python3.10/site-packages/parlai/core/torch_generator_agent.py", line 526, in init
self.model = self.build_model()
File "/home/cklo/.local/lib/python3.10/site-packages/parlai/agents/fid/fid.py", line 224, in build_model
model = T5FidModel(self.opt, self.dict)
File "/home/cklo/.local/lib/python3.10/site-packages/parlai/agents/fid/fid.py", line 192, in init
super().init(opt, dictionary, retriever_shared=retriever_shared)
File "/home/cklo/.local/lib/python3.10/site-packages/parlai/agents/fid/fid.py", line 77, in init
super().init(opt, dictionary, retriever_shared=retriever_shared)
File "/home/cklo/.local/lib/python3.10/site-packages/parlai/agents/rag/modules.py", line 549, in init
super().init(opt, dictionary, retriever_shared)
File "/home/cklo/.local/lib/python3.10/site-packages/parlai/agents/rag/modules.py", line 91, in init
self.seq2seq_decoder = self.build_decoder(
File "/home/cklo/.local/lib/python3.10/site-packages/parlai/agents/rag/modules.py", line 581, in build_decoder
return RagModel.build_decoder(
File "/home/cklo/.local/lib/python3.10/site-packages/parlai/agents/rag/modules.py", line 131, in build_decoder
return decoder_class(opt, *args, **kwargs)
TypeError: ParlaiT5Decoder.init() got an unexpected keyword argument 'dictionary'
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Bug description
I'm trying to fine-tune the FiD model in ParlAI with QuAC following the code from official document.
https://parl.ai/projects/hallucination/
parlai train_model --model fid --task wizard_of_wikipedia
--rag-retriever-type dpr --query-model bert_from_parlai_rag
--dpr-model-file zoo:hallucination/bart_rag_token/model
--retriever-small-index exact
--generation-model t5 --t5-model-arch t5-base
--batchsize 16 --fp16 True --gradient-clip 0.1 --label-truncate 128
--log-every-n-secs 30 --lr-scheduler reduceonplateau --lr-scheduler-patience 1
--model-parallel True --optimizer adam --text-truncate 512 --truncate 512
--learningrate 1e-05 --validation-metric-mode min --validation-every-n-epochs 0.25
--validation-max-exs 1000 --validation-metric ppl --validation-patience 5
--model-file /path/to/saved/model.
However, it keeps showing that ParlaiT5Decoder.init() got an unexpected keyword argument 'dictionary'.
It seems like there is a change in the T5 decoder. How to deal with this issue?
I make a little change to the code
parlai train_model --model fid --task quac
--gpu 0
--rag-retriever-type dpr
--query-model bert_from_parlai_rag
--dpr-model-file zoo:hallucination/bart_rag_token/model
--generation-model t5 --t5-model-arch t5-small
--batchsize 16 --fp16 True --gradient-clip 0.1 --label-truncate 128
--log-every-n-secs 30 --lr-scheduler reduceonplateau --lr-scheduler-patience 1
--model-parallel True --optimizer adam --text-truncate 512 --truncate 512
--learningrate 1e-05 --validation-metric-mode min --validation-every-n-epochs 0.25
--validation-max-exs 1000 --validation-metric ppl --validation-patience 5
--model-file /home/cklo/RAGProject/FiD_wParlAI/pretrained_model
Logs
Traceback (most recent call last):
File "/home/cklo/.local/bin/parlai", line 8, in
sys.exit(main())
File "/home/cklo/.local/lib/python3.10/site-packages/parlai/main.py", line 14, in main
superscript_main()
File "/home/cklo/.local/lib/python3.10/site-packages/parlai/core/script.py", line 325, in superscript_main
return SCRIPT_REGISTRY[cmd].klass._run_from_parser_and_opt(opt, parser)
File "/home/cklo/.local/lib/python3.10/site-packages/parlai/core/script.py", line 108, in _run_from_parser_and_opt
return script.run()
File "/home/cklo/.local/lib/python3.10/site-packages/parlai/scripts/train_model.py", line 1082, in run
self.train_loop = TrainLoop(self.opt)
File "/home/cklo/.local/lib/python3.10/site-packages/parlai/scripts/train_model.py", line 380, in init
self.agent = create_agent(opt)
File "/home/cklo/.local/lib/python3.10/site-packages/parlai/core/agents.py", line 479, in create_agent
model = model_class(opt)
File "/home/cklo/.local/lib/python3.10/site-packages/parlai/agents/rag/rag.py", line 186, in init
self._generation_agent.init(self, opt, shared) # type: ignore
File "/home/cklo/.local/lib/python3.10/site-packages/parlai/core/torch_generator_agent.py", line 526, in init
self.model = self.build_model()
File "/home/cklo/.local/lib/python3.10/site-packages/parlai/agents/fid/fid.py", line 224, in build_model
model = T5FidModel(self.opt, self.dict)
File "/home/cklo/.local/lib/python3.10/site-packages/parlai/agents/fid/fid.py", line 192, in init
super().init(opt, dictionary, retriever_shared=retriever_shared)
File "/home/cklo/.local/lib/python3.10/site-packages/parlai/agents/fid/fid.py", line 77, in init
super().init(opt, dictionary, retriever_shared=retriever_shared)
File "/home/cklo/.local/lib/python3.10/site-packages/parlai/agents/rag/modules.py", line 549, in init
super().init(opt, dictionary, retriever_shared)
File "/home/cklo/.local/lib/python3.10/site-packages/parlai/agents/rag/modules.py", line 91, in init
self.seq2seq_decoder = self.build_decoder(
File "/home/cklo/.local/lib/python3.10/site-packages/parlai/agents/rag/modules.py", line 581, in build_decoder
return RagModel.build_decoder(
File "/home/cklo/.local/lib/python3.10/site-packages/parlai/agents/rag/modules.py", line 131, in build_decoder
return decoder_class(opt, *args, **kwargs)
TypeError: ParlaiT5Decoder.init() got an unexpected keyword argument 'dictionary'
The text was updated successfully, but these errors were encountered: