Skip to content

fix: correct pip install order so VLSearchImage is registered (fixes #234)#253

Open
octo-patch wants to merge 1 commit intoAlibaba-NLP:mainfrom
octo-patch:fix/issue-234-vlsearchimage-registration
Open

fix: correct pip install order so VLSearchImage is registered (fixes #234)#253
octo-patch wants to merge 1 commit intoAlibaba-NLP:mainfrom
octo-patch:fix/issue-234-vlsearchimage-registration

Conversation

@octo-patch
Copy link
Copy Markdown

Fixes #234

Problem

The eval.sh script installs packages in the wrong order, causing VLSearchImage to be absent from TOOL_REGISTRY when agent_eval.py runs:

# OLD (broken) order
pip uninstall qwen-agent
pip install -e vl_search_r1/qwen-agent-o1_search --no-deps   # installs local fork with VLSearchImage
pip install "qwen-agent[code_interpreter]"                     # ← overwrites local fork with PyPI version!

Because pip install "qwen-agent[code_interpreter]" replaces the editable local install, VLSearchImage is no longer in TOOL_REGISTRY. When Qwen_agent is then instantiated with function_list=['web_search', 'VLSearchImage', 'visit', 'code_interpreter'], qwen-agent raises:

ValueError: Tool VLSearchImage is not registered.

Solution

Reverse the install order so the local fork (which adds VLSearchImage) is installed after the PyPI package has already pulled in all dependencies:

# NEW (correct) order
pip install "qwen-agent[code_interpreter]"                     # pulls in all deps first
pip install -e vl_search_r1/qwen-agent-o1_search --no-deps   # overrides with local fork; VLSearchImage stays registered

The pip uninstall qwen-agent step is also removed as it is unnecessary — pip install already replaces an existing installation.

Testing

Verified the eval.sh diff is minimal (3-line change) and that the install sequence now ends with the local fork active, ensuring VLSearchImage is in TOOL_REGISTRY when agent_eval.py initialises Qwen_agent.

…libaba-NLP#234)

The previous install sequence uninstalled qwen-agent, installed the local
vl_search_r1/qwen-agent-o1_search (which provides VLSearchImage), and then
reinstalled the standard qwen-agent from PyPI — overwriting the local version
and removing VLSearchImage from TOOL_REGISTRY.

Reversed the order: install qwen-agent[code_interpreter] first (to pull in all
required dependencies), then install the local fork in editable mode --no-deps
so VLSearchImage remains available when agent_eval.py runs.

Co-Authored-By: Octopus <liyuan851277048@icloud.com>
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.

ValueError: Tool VLSearchImage is not registered.

1 participant