DB-GPT-Hub
DB-GPT-Hub copied to clipboard
The issue of mixing get_args() and transformers.HfArgumentParser()
command:
CUDA_VISIBLE_DEVICES=2 python ./predict_lora.py --base_model_name_or_path /models/Baichuan-13B-Chat --peft_ckpt_path /home/chopin/finetune_model/baichuan-13b_ft2 --output_name ./data/out_pred/pre_lora_spider_schema.sql
errors:
[2023-08-15 15:01:58,636] [INFO] [real_accelerator.py:133:get_accelerator] Setting ds_accelerator to cuda (auto detect)
Traceback (most recent call last):
File "/home/chopin/code/DB-GPT-Hub/./predict_lora.py", line 186, in <module>
result = predict()
File "/home/chopin/code/DB-GPT-Hub/./predict_lora.py", line 62, in predict
model_server_args, generation_args = parser.parse_args_into_dataclasses()
File "/home/chopin/miniconda3/envs/ft/lib/python3.10/site-packages/transformers/hf_argparser.py", line 347, in parse_args_into_dataclasses
raise ValueError(f"Some specified arguments are not used by the HfArgumentParser: {remaining_args}")
ValueError: Some specified arguments are not used by the HfArgumentParser: ['--base_model_name_or_path', '/models/Baichuan-13B-Chat', '--peft_ckpt_path', '/home/chopin/finetune_model/baichuan-13b_ft2', '--output_name', './data/out_pred/pre_lora_spider_schema.sql']
the same issue
+1, Have you resolved it?
已解决,不要在 predict_lora.py 后面增加 --peft_ckpt_path 这些参数,改到代码里面的 default 就好了,算临时绕过去了吧
change https://github.com/eosphoros-ai/DB-GPT-Hub/blob/main/predict_lora.py#L62 to: model_server_args, generation_args, _ = parser.parse_args_into_dataclasses(return_remaining_strings=True)
seems the parse_args_into_dataclasses is not compatible.