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

Bug: Fix searcher_resp_queue not available sometimes #69

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

richard1122
Copy link

@richard1122 richard1122 commented Aug 3, 2024

The graph may not be ready when we try to access it for the first time. Sometimes the code returned by LLM (gpt4o for example), especially the first line graph = WebSearchGraph(), has not been executed yet.
This PR adds a retry mechanism when accessing graph, which partly fixes issue #36 #17.

image

@liujiangning30
Copy link
Collaborator

liujiangning30 commented Aug 5, 2024

Thank you so much for your PR! I appreciate your contribution to the project.

I've reviewed the code and have a few comments and suggestions for improvement:

  1. continue runs the risk of making the execute_code function fall into a dead loop. By using raise without any arguments in the except block of func run_command, it will re-raise the caught exception, preserving the original traceback information.

@richard1122
Copy link
Author

Hi @liujiangning30, I'm not quite understand your comment, like

By using raise without any arguments in the except block of func run_command, it will re-raise the caught exception, preserving the original traceback information.

Are you suggesting to add a limit (like 5 times) of retry, then raise an exception?

@liujiangning30
Copy link
Collaborator

Yes

Hi @liujiangning30, I'm not quite understand your comment, like

By using raise without any arguments in the except block of func run_command, it will re-raise the caught exception, preserving the original traceback information.

Are you suggesting to add a limit (like 5 times) of retry, then raise an exception?

@datalee
Copy link

datalee commented Aug 7, 2024

我这边正好相反,我这边的case一直都获取不到结果,是因为python执行器的问题,而且建议上面加一个重试次数的限制!https://github.com/InternLM/MindSearch/issues/36

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

Successfully merging this pull request may close these issues.

3 participants