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 was archived by the owner on Nov 3, 2023. It is now read-only.
Bug description
When training T5 model with Transformer version 4.10+, ParlAI will throw a runtime error Must use transformers package >= 4.3 to use t5.
Reproduction steps
Install the latest Transformer and run any T5 training command. For example: parlai train_model -m hugging_face/t5 -mf $HOME/project/model/t5_test -t convai2 -bs 24 --fp16 true -eps 1 -lr 1e-5 --optimizer adam --t5-model-arch t5-3b --t5-model-parallel true
Expected behavior
There should be no runtime error.
Logs
Traceback (most recent call last):
File "/home/mozhi/miniconda3/bin/parlai", line 33, in <module>
sys.exit(load_entry_point('parlai', 'console_scripts', 'parlai')())
File "/mnt/mozhi/ParlAI/parlai/__main__.py", line 14, in main
superscript_main()
File "/mnt/mozhi/ParlAI/parlai/core/script.py", line 325, in superscript_main
return SCRIPT_REGISTRY[cmd].klass._run_from_parser_and_opt(opt, parser)
File "/mnt/mozhi/ParlAI/parlai/core/script.py", line 108, in _run_from_parser_and_opt
return script.run()
File "/mnt/mozhi/ParlAI/parlai/scripts/train_model.py", line 997, in run
self.train_loop = TrainLoop(self.opt)
File "/mnt/mozhi/ParlAI/parlai/scripts/train_model.py", line 353, in __init__
self.agent = create_agent(opt)
File "/mnt/mozhi/ParlAI/parlai/core/agents.py", line 479, in create_agent
model = model_class(opt)
File "/mnt/mozhi/ParlAI/parlai/core/torch_generator_agent.py", line 484, in __init__
self.model = fsdp_utils.fsdp_wrap(self.build_model())
File "/mnt/mozhi/ParlAI/parlai/agents/hugging_face/t5.py", line 105, in build_model
model = ParlaiT5Model(self.opt, self.dict)
File "/mnt/mozhi/ParlAI/parlai/agents/hugging_face/t5.py", line 285, in __init__
self.t5 = build_t5(opt)
File "/mnt/mozhi/ParlAI/parlai/agents/hugging_face/t5.py", line 34, in build_t5
raise RuntimeError('Must use transformers package >= 4.3 to use t5')
RuntimeError: Must use transformers package >= 4.3 to use t5
Additional context
The build_t5 method in parlai/agents/hugging_face/t5.py compares HF versions as floating numbers, which causes this error. This should be an easy fix.
The text was updated successfully, but these errors were encountered:
Bug description
When training T5 model with Transformer version 4.10+, ParlAI will throw a runtime error
Must use transformers package >= 4.3 to use t5
.Reproduction steps
Install the latest Transformer and run any T5 training command. For example:
parlai train_model -m hugging_face/t5 -mf $HOME/project/model/t5_test -t convai2 -bs 24 --fp16 true -eps 1 -lr 1e-5 --optimizer adam --t5-model-arch t5-3b --t5-model-parallel true
Expected behavior
There should be no runtime error.
Logs
Additional context
The
build_t5
method inparlai/agents/hugging_face/t5.py
compares HF versions as floating numbers, which causes this error. This should be an easy fix.The text was updated successfully, but these errors were encountered: