Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Aflow 运行报错 #1706

Open
qjs2000 opened this issue Feb 20, 2025 · 0 comments
Open

Aflow 运行报错 #1706

qjs2000 opened this issue Feb 20, 2025 · 0 comments

Comments

@qjs2000
Copy link

qjs2000 commented Feb 20, 2025

运行Aflow 命令,只运行完成round1的执行。然后就都报错,是否不支持qwen 和 deepseek模型来实现?

命令:

python -m examples.aflow.optimize --dataset MATH --opt_model_name deepseek-v3 --exec_model_name qwen2.5
--if_first_optimize=false

模型配置:

models:
"qwen2.5":
api_type: "dashscope"
model: "qwen2.5-72b-instruct"
base_url: "https://dashscope.aliyuncs.com/compatible-mode/v1"
api_key: "sk-xxxx"
temperature: 0.5
"deepseek-v3":
api_type: "dashscope"
model: "deepseek-v3"
base_url: "https://dashscope.aliyuncs.com/compatible-mode/v1"
api_key: "sk-xxxx"
temperature: 0.5

报错信息:

Bug description

2025-02-20 16:25:18.965 | INFO | metagpt.ext.aflow.scripts.optimizer:optimize:93 - Error occurred: Unable to serialize unknown type: <class 'numpy.int64'>. Retrying... (Attempt 1/1)
2025-02-20 16:25:18.968 | INFO | metagpt.ext.aflow.scripts.optimizer:optimize:95 - Max retries reached. Moving to next round.
2025-02-20 16:25:23.971 | INFO | metagpt.ext.aflow.scripts.optimizer:optimize:106 - Score for round 2: None
Traceback (most recent call last):
File "", line 198, in run_module_as_main
File "", line 88, in run_code
File "C:\work\spaces\MetaGPT\examples\aflow\optimize.py", line 133, in
optimizer.optimize("Graph")
File "C:\work\spaces\MetaGPT\metagpt\ext\aflow\scripts\optimizer.py", line 108, in optimize
converged, convergence_round, final_round = self.convergence_utils.check_convergence(top_k=3)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\work\spaces\MetaGPT\metagpt\ext\aflow\scripts\optimizer_utils\convergence_utils.py", line 74, in check_convergence
self.avg_scores, self.stds = self.calculate_avg_and_std()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\work\spaces\MetaGPT\metagpt\ext\aflow\scripts\optimizer_utils\convergence_utils.py", line 58, in calculate_avg_and_std
self.rounds = self.process_rounds()
^^^^^^^^^^^^^^^^^^^^^
File "C:\work\spaces\MetaGPT\metagpt\ext\aflow\scripts\optimizer_utils\convergence_utils.py", line 44, in process_rounds
self.data = self.load_data(root_path=self.root_path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\work\spaces\MetaGPT\metagpt\ext\aflow\scripts\optimizer_utils\convergence_utils.py", line 38, in load_data
return json.load(file)
^^^^^^^^^^^^^^^
File "C:\Users\ThinkPad.conda\envs\metagpt\Lib\json_init
.py", line 293, in load
return loads(fp.read(),
^^^^^^^^^^^^^^^^
File "C:\Users\ThinkPad.conda\envs\metagpt\Lib\json_init
.py", line 346, in loads
return _default_decoder.decode(s)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\ThinkPad.conda\envs\metagpt\Lib\json\decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\ThinkPad.conda\envs\metagpt\Lib\json\decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 6 column 23 (char 112)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant