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

metagpt.ext.aflow.scripts.optimizer:optimize:93 - Error occurred: object list can't be used in 'await' expression. Retrying... (Attempt 1/1) #1597

Open
CALMCRAZY opened this issue Nov 13, 2024 · 4 comments
Labels

Comments

@CALMCRAZY
Copy link

CALMCRAZY commented Nov 13, 2024

Bug description
metagpt.ext.aflow.scripts.optimizer:optimize:93 - Error occurred: object list can't be used in 'await' expression. Retrying... (Attempt 1/1)

Bug solved method
not solved

An error occurred when running AFLOW with this command:

python -m examples.aflow.optimize --dataset custom --max_rounds 1 --validation_rounds 3 --sample 2

Environment information

  • LLM type and model name:OpenAI grok-beta

  • System version:Windows 11

  • Python version:conda python 3.11.1

  • MetaGPT version or branch:2024.11 main

  • packages version:unknown

  • installation method: pip install -e .

Screenshots or logs
2024-11-13 17:12:16.364 | INFO | metagpt.const:get_metagpt_package_root:21 - Package root set to B:\software\MetaGPT
2024-11-13 17:12:20.381 | INFO | metagpt.ext.aflow.scripts.optimizer:optimize:93 - Error occurred: object list can't be used in 'await' expression. Retrying... (Attempt 1/1)
2024-11-13 17:12:20.382 | INFO | metagpt.ext.aflow.scripts.optimizer:optimize:95 - Max retries reached. Moving to next round.
2024-11-13 17:12:25.384 | INFO | metagpt.ext.aflow.scripts.optimizer:optimize:106 - Score for round 2: None

@didiforgithub
Copy link
Contributor

Hi, thanks for your usage.

For this question, maybe you need to first determine that the custom dataset is set in DatasetType.

Subsequently, you can check your eval function to ensure that graph_evaluate returns the correct score, avg_cost, and total_cost. If the problem still cannot be resolved, you can provide more information.

@CALMCRAZY
Copy link
Author

CALMCRAZY commented Nov 13, 2024

Hi, thanks for your usage.

For this question, maybe you need to first determine that the custom dataset is set in DatasetType.

Subsequently, you can check your eval function to ensure that graph_evaluate returns the correct score, avg_cost, and total_cost. If the problem still cannot be resolved, you can provide more information.

I checked what you mentioned:
The DatasetType configuration is correct.
The return value of the evaluation function meets expectations.

It seems that the run_evaluation method of BaseBenchmark erroneously awaited the synchronized load_data method. Load_data is a synchronization method that uses pandas to read files. It may not be necessary or appropriate to use await. When I removed 'await' and the bug disappeared, I had to observe for a while longer.

@didiforgithub
Copy link
Contributor

Sincerely thank you for your discovery, we will fix the BUG as soon as possible!

Copy link

This issue has no activity in the past 30 days. Please comment on the issue if you have anything to add.

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

No branches or pull requests

2 participants