niuzaisheng / ScreenAgent

ScreenAgent: A Computer Control Agent Driven by Visual Language Large Model (IJCAI-24)
https://arxiv.org/abs/2402.07945
Other
217 stars 24 forks source link

ValueError: model_class FineTuneTrainCogAgentModel not found. #8

Open Redtides0 opened 4 months ago

Redtides0 commented 4 months ago

整体报错如下,从huggingface那里下载的zip文件解压后得到的 model_config.json中对于"model_class":定义的是"FineTuneTrainCogAgentModel",但是我在print出member的时候发现并没有这个模型类型。 请问如何解决? [2024-03-17 07:41:22,582] [INFO] [real_accelerator.py:191:get_accelerator] Setting ds_accelerator to cuda (auto detect) 2024-03-17 07:41:24 | INFO | model_worker | args: Namespace(host='0.0.0.0', port=40000, max_length=2048, top_p=0.4, top_k=1, temperature=0.8, chinese=False, version='chat', quant=None, stream_chat=False, from_pretrained='/r/ScreenAgent/train/checkpoints/ScreenAgent-2312/merged_model_translated-01-14-22-27', local_tokenizer='lmsys/vicuna-7b-v1.5', fp16=False, bf16=True) 2024-03-17 07:41:24 | INFO | stdout | 看看name /r/ScreenAgent/train/checkpoints/ScreenAgent-2312/merged_model_translated-01-14-22-27 2024-03-17 07:41:24 | INFO | stdout | 都有哪些模型: {'BaseModel': <class 'sat.model.base_model.BaseModel'>, 'CachedAutoregressiveModel': <class 'sat.model.cached_autoregressive_model.CachedAutoregressiveModel'>, 'Cuda2dModel': <class 'sat.model.official.cuda2d_model.Cuda2dModel'>, 'GLMModel': <class 'sat.model.official.glm_model.GLMModel'>, 'ViTModel': <class 'sat.model.official.vit_model.ViTModel'>, 'BertModel': <class 'sat.model.official.bert_model.BertModel'>, 'RobertaModel': <class 'sat.model.official.roberta_model.RobertaModel'>, 'MAEEncoder': <class 'sat.model.official.mae_model.MAEEncoder'>, 'MAEDecoder': <class 'sat.model.official.mae_model.MAEDecoder'>, 'GLM130B': <class 'sat.model.official.glm130B_model.GLM130B'>, 'ImageEncoder': <class 'sat.model.official.clip_model.ImageEncoder'>, 'TextEncoder': <class 'sat.model.official.clip_model.TextEncoder'>, 'GPTNeoModel': <class 'sat.model.official.gptneo_model.GPTNeoModel'>, 'DPRQuestionEncoder': <class 'sat.model.official.dpr_model.DPRQuestionEncoder'>, 'DPRContextEncoder': <class 'sat.model.official.dpr_model.DPRContextEncoder'>, 'DPRReader': <class 'sat.model.official.dpr_model.DPRReader'>, 'GPT2Model': <class 'sat.model.official.gpt2_model.GPT2Model'>, 'ChatGLMModel': <class 'sat.model.official.chatglm_model.ChatGLMModel'>, 'EVA2Model': <class 'sat.model.official.eva2_model.EVA2Model'>, 'LLaMAModel': <class 'sat.model.official.llama_model.LLaMAModel'>, 'ChatGLM2Model': <class 'sat.model.official.chatglm2_model.ChatGLM2Model'>, 'ChatGLM3Model': <class 'sat.model.official.chatglm3_model.ChatGLM3Model'>}

2024-03-17 07:41:24 | ERROR | stderr | Traceback (most recent call last): 2024-03-17 07:41:24 | ERROR | stderr | File "/r/ScreenAgent/train/./cogagent_model_worker.py", line 145, in 2024-03-17 07:41:24 | ERROR | stderr | worker = ModelWorker(args) 2024-03-17 07:41:24 | ERROR | stderr | File "/r/ScreenAgent/train/./cogagent_model_worker.py", line 41, in init 2024-03-17 07:41:24 | ERROR | stderr | model, model_args = AutoModel.from_pretrained( 2024-03-17 07:41:24 | ERROR | stderr | File "/opt/conda/envs/agent/lib/python3.9/site-packages/sat/model/base_model.py", line 338, in from_pretrained 2024-03-17 07:41:24 | ERROR | stderr | return cls.from_pretrained_base(name, args=args, home_path=home_path, url=url, prefix=prefix, build_only=build_only, overwrite_args=overwrite_args, **kwargs) 2024-03-17 07:41:24 | ERROR | stderr | File "/opt/conda/envs/agent/lib/python3.9/site-packages/sat/model/base_model.py", line 322, in from_pretrained_base 2024-03-17 07:41:24 | ERROR | stderr | model_cls = model_registry.get(args.model_class) 2024-03-17 07:41:24 | ERROR | stderr | File "/opt/conda/envs/agent/lib/python3.9/site-packages/sat/model/registry.py", line 24, in get 2024-03-17 07:41:24 | ERROR | stderr | raise ValueError(f'model_class {name} not found.') 2024-03-17 07:41:24 | ERROR | stderr | ValueError: model_class FineTuneTrainCogAgentModel not found.

Redtides0 commented 4 months ago

SwissArmyTransformer的版本是0.4.9

fangkaipeng commented 4 months ago

请问解决了吗?遇到了一样的问题

Redtides0 commented 4 months ago

请问解决了吗?遇到了一样的问题

还没有解决

niuzaisheng commented 4 months ago

已修复