-
-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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]: AttributeError in OpenAIServingChat when accessing chat_template
when using ray serve
#4296
Labels
bug
Something isn't working
Comments
See this PR: #2727 |
Fixed by #2727 |
Hi @DarkLight1337 Its not been fixed yet i still that that
|
Can you open a new issue and provide more detailed information? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Your current environment
vllm version : [v0.4.1]
🐛 Describe the bug
Description
I'm encountering an AttributeError in the
OpenAIServingChat
module when integrating Ray Serve with the OpenAI API. The error arises because thetokenizer
object is accessed before it is fully initialized.Error Message
the error occured in this line
Issue Details
The
tokenizer
is instantiated asynchronously in the_post_init()
function of theOpenAIServing
class. However, this instantiation occurs conditionally within the constructor based on the status of an existing event loopThe
_load_chat_template
function, which relies ontokenizer
, is invoked synchronously here, potentially beforetokenizer
is fully initialized.Suggested Solution
Convert
_load_chat_template
to an asynchronous function and invoke it similarly to_post_init
, ensuring it is executed after the tokenizer has been initialized. This modification should maintain the sequence of initialization and avoid premature access.The text was updated successfully, but these errors were encountered: