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

fix test bug in srt_llava_next_test.py #470

Merged
merged 1 commit into from
May 24, 2024
Merged

fix test bug in srt_llava_next_test.py #470

merged 1 commit into from
May 24, 2024

Conversation

bingwork
Copy link
Contributor

otherwise it will cause error like below:

========== single ==========

/home/ubuntu/wubing/sglang/python/sglang/lang/interpreter.py:328: UserWarning: Error in stream_executor: Traceback (most recent call last):
File "/home/ubuntu/wubing/sglang/python/sglang/lang/interpreter.py", line 326, in _thread_worker_func
self._execute(expr)
File "/home/ubuntu/wubing/sglang/python/sglang/lang/interpreter.py", line 369, in _execute
self._execute(x)
File "/home/ubuntu/wubing/sglang/python/sglang/lang/interpreter.py", line 369, in _execute
self._execute(x)
File "/home/ubuntu/wubing/sglang/python/sglang/lang/interpreter.py", line 375, in _execute
self._execute_image(other)
File "/home/ubuntu/wubing/sglang/python/sglang/lang/interpreter.py", line 419, in _execute_image
base64_data = encode_image_base64(path)
File "/home/ubuntu/wubing/sglang/python/sglang/utils.py", line 116, in encode_image_base64
image.save(buffered, format="PNG")
AttributeError: 'tuple' object has no attribute 'save'

warnings.warn(f"Error in stream_executor: {get_exception_traceback()}")
Traceback (most recent call last):
File "/home/ubuntu/wubing/sglang/examples/usage/llava/srt_llava_next_test.py", line 78, in
single()
File "/home/ubuntu/wubing/sglang/examples/usage/llava/srt_llava_next_test.py", line 22, in single
print(state["answer"], "\n")
File "/home/ubuntu/wubing/sglang/python/sglang/lang/interpreter.py", line 844, in getitem
return self.get_var(name)
File "/home/ubuntu/wubing/sglang/python/sglang/lang/interpreter.py", line 831, in get_var
return self.stream_executor.get_var(name)
File "/home/ubuntu/wubing/sglang/python/sglang/lang/interpreter.py", line 252, in get_var
return self.variables[name]
KeyError: 'answer'

@merrymercy merrymercy merged commit 3167d8d into sgl-project:main May 24, 2024
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.

2 participants