Upgrade to vllm 0.17.0 corex v4.1 overlay
This commit is contained in:
@@ -1,18 +1,22 @@
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
|
||||
|
||||
import inspect
|
||||
import logging
|
||||
|
||||
from vllm.config import VllmConfig
|
||||
from vllm.plugins import IO_PROCESSOR_PLUGINS_GROUP, load_plugins_by_group
|
||||
from vllm.plugins.io_processors.interface import IOProcessor
|
||||
from vllm.renderers import BaseRenderer
|
||||
from vllm.utils.import_utils import resolve_obj_by_qualname
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
def get_io_processor(
|
||||
vllm_config: VllmConfig, plugin_from_init: str | None = None
|
||||
vllm_config: VllmConfig,
|
||||
renderer: BaseRenderer,
|
||||
plugin_from_init: str | None = None,
|
||||
) -> IOProcessor | None:
|
||||
# Input.Output processors are loaded as plugins under the
|
||||
# 'vllm.io_processor_plugins' group. Similar to platform
|
||||
@@ -65,4 +69,14 @@ def get_io_processor(
|
||||
|
||||
activated_plugin_cls = loadable_plugins[model_plugin]
|
||||
|
||||
return resolve_obj_by_qualname(activated_plugin_cls)(vllm_config)
|
||||
activated_plugin_typ = resolve_obj_by_qualname(activated_plugin_cls)
|
||||
|
||||
# for backward compatibility, the plugin does not have a renderer argument
|
||||
if "renderer" not in inspect.signature(activated_plugin_typ.__init__).parameters:
|
||||
logger.warning(
|
||||
"The renderer argument will be required in v0.18, "
|
||||
"please update your IOProcessor plugin: %s",
|
||||
activated_plugin_cls,
|
||||
)
|
||||
return activated_plugin_typ(vllm_config)
|
||||
return activated_plugin_typ(vllm_config, renderer)
|
||||
|
||||
Reference in New Issue
Block a user