A high-throughput and memory-efficient inference and serving engine for LLMs
Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git
Synced Nov 16, 02:00 UTC
[Platform] improve platforms getattr (#12264)
Signed-off-by: Mengqing Cao <cmq0113@163.com>
Mengqing Cao committed
Jan 21, 2025 at 22:42 UTC
c64612802b72f1e015b98e0c569367e12391f579
1 file changed
+4
-1
vllm/platforms/__init__.py
+4
-1
@@ -217,8 +217,11 @@ def __getattr__(name: str):
217
global _init_trace
218
_init_trace = "".join(traceback.format_stack())
219
return _current_platform
220
- else:
220
+ elif name in globals():
221
return globals()[name]
222
+ else:
223
+ raise AttributeError(
224
+ f"No attribute named '{name}' exists in {__name__}.")
225
226
227
__all__ = [