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

[Bugfix][TPU][V1] Disable StructuredOutputManager import on TPU #14573

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions vllm/v1/engine/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
from vllm.config import VllmConfig
from vllm.logger import init_logger
from vllm.lora.request import LoRARequest
from vllm.platforms import current_platform
from vllm.transformers_utils.config import (
maybe_register_config_serialize_by_value)
from vllm.utils import get_exception_traceback, zmq_socket_ctx
Expand All @@ -31,6 +32,18 @@
from vllm.v1.serial_utils import MsgpackDecoder, MsgpackEncoder
from vllm.v1.structured_output import StructuredOutputManager
from vllm.version import __version__ as VLLM_VERSION
if not current_platform.is_tpu():
from vllm.v1.structured_output import StructuredOutputManager
else:

class StructuredOutputManager:

Check failure on line 40 in vllm/v1/engine/core.py

View workflow job for this annotation

GitHub Actions / pre-commit

Name "StructuredOutputManager" already defined (possibly by an import) [no-redef]

Check failure on line 40 in vllm/v1/engine/core.py

View workflow job for this annotation

GitHub Actions / pre-commit

Name "StructuredOutputManager" already defined (possibly by an import) [no-redef]

Check failure on line 40 in vllm/v1/engine/core.py

View workflow job for this annotation

GitHub Actions / pre-commit

Name "StructuredOutputManager" already defined (possibly by an import) [no-redef]

Check failure on line 40 in vllm/v1/engine/core.py

View workflow job for this annotation

GitHub Actions / pre-commit

Name "StructuredOutputManager" already defined (possibly by an import) [no-redef]

Check failure on line 40 in vllm/v1/engine/core.py

View workflow job for this annotation

GitHub Actions / pre-commit

Name "StructuredOutputManager" already defined (possibly by an import) [no-redef]

Check failure on line 40 in vllm/v1/engine/core.py

View workflow job for this annotation

GitHub Actions / pre-commit

Name "StructuredOutputManager" already defined (possibly by an import) [no-redef]

Check failure on line 40 in vllm/v1/engine/core.py

View workflow job for this annotation

GitHub Actions / pre-commit

Name "StructuredOutputManager" already defined (possibly by an import) [no-redef]

Check failure on line 40 in vllm/v1/engine/core.py

View workflow job for this annotation

GitHub Actions / pre-commit

Name "StructuredOutputManager" already defined (possibly by an import) [no-redef]

Check failure on line 40 in vllm/v1/engine/core.py

View workflow job for this annotation

GitHub Actions / pre-commit

Name "StructuredOutputManager" already defined (possibly by an import) [no-redef]

Check failure on line 40 in vllm/v1/engine/core.py

View workflow job for this annotation

GitHub Actions / pre-commit

Name "StructuredOutputManager" already defined (possibly by an import) [no-redef]
def __init__(self, *args, **kwargs):
pass

def __getattr__(self, name):
return lambda *args, **kwargs: None
Comment on lines +39 to +45
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I really hate this cheap workaround. Is anyone working on properly addressing this @njhill @russellb ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll push something now

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here's an alternative: #14575



logger = init_logger(__name__)

Expand Down