Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@GaetanLepage
Copy link

@GaetanLepage GaetanLepage commented Dec 7, 2025

What this PR does / why we need it:

Context: Updating vllm in nixpkgs (NixOS/nixpkgs#467418).

EDIT: Updated to fix compatibility with vllm 0.15.0.

Latest vllm release 0.12.0 changed the location of a few classes (Embedding* and Rerank*).
This PR updates the imports in kserve/protocol/rest/openai/types/__init__.py.

Type of changes
Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Feature/Issue validation/testing:

Before, this PR, running kserve's test suite had a few failures:

=========================== short test summary info ============================
ERROR test/test_dataplane.py
ERROR test/test_model_repository.py
ERROR test/test_openai_completion.py
ERROR test/test_openai_encoder.py
================= 173 passed, 131 warnings, 4 errors in 32.00s =================

Example:

_________________ ERROR collecting test/test_openai_encoder.py _________________
ImportError while importing test module '/build/source/python/kserve/test/test_openai_encoder.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/nix/store/3lll9y925zz9393sa59h653xik66srjb-python3-3.13.9/lib/python3.13/importlib/__init__.py:88: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
test/test_openai_encoder.py:20: in <module>
    from kserve.protocol.rest.openai import (
kserve/protocol/rest/openai/__init__.py:16: in <module>
    from .openai_model import (
kserve/protocol/rest/openai/openai_model.py:22: in <module>
    from kserve.protocol.rest.openai.types import (
kserve/protocol/rest/openai/types/__init__.py:35: in <module>
    from vllm.entrypoints.pooling.embed.protocol import RerankRequest, RerankResponse as Rerank
E   ImportError: cannot import name 'RerankRequest' from 'vllm.entrypoints.pooling.embed.protocol'

After this change, all tests are successful.

Special notes for your reviewer:

  1. Please confirm that if this PR changes any image versions, then that's the sole change this PR makes.

Checklist:

  • Have you added unit/e2e tests that prove your fix is effective or that this feature works?
  • Has code been commented, particularly in hard-to-understand areas?
  • Have you made corresponding changes to the documentation?

Release note:


Re-running failed tests

  • /rerun-all - rerun all failed workflows.
  • /rerun-workflow <workflow name> - rerun a specific failed workflow. Only one workflow name can be specified. Multiple /rerun-workflow commands are allowed per comment.

GaetanLepage added a commit to GaetanLepage/nixpkgs that referenced this pull request Dec 7, 2025
GaetanLepage added a commit to GaetanLepage/nixpkgs that referenced this pull request Dec 26, 2025
GaetanLepage added a commit to GaetanLepage/nixpkgs that referenced this pull request Dec 27, 2025
GaetanLepage added a commit to GaetanLepage/nixpkgs that referenced this pull request Dec 27, 2025
GaetanLepage added a commit to GaetanLepage/nixpkgs that referenced this pull request Dec 29, 2025
Copy link
Contributor

@gavrissh gavrissh left a comment

Choose a reason for hiding this comment

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

lgtm

@GaetanLepage could you please sign off the commit?

@GaetanLepage
Copy link
Author

lgtm

@GaetanLepage could you please sign off the commit?

Sure! Done.

Update vllm imports to ensure compatibility with vllm 0.15.0
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