File tree 1 file changed +8
-3
lines changed
1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change 43
43
from vllm .transformers_utils .s3_utils import S3Model
44
44
from vllm .transformers_utils .utils import is_s3 , maybe_model_redirect
45
45
from vllm .utils import (GiB_bytes , LayerBlockType , cuda_device_count_stateless ,
46
- get_cpu_memory , get_open_port , is_torch_equal_or_newer ,
47
- random_uuid , resolve_obj_by_qualname )
46
+ get_cpu_memory , get_open_port , is_in_doc_build ,
47
+ is_torch_equal_or_newer , random_uuid ,
48
+ resolve_obj_by_qualname )
49
+
50
+ IS_IN_DOC_BUILD = is_in_doc_build ()
48
51
49
52
if TYPE_CHECKING :
50
53
from _typeshed import DataclassInstance
@@ -2207,7 +2210,9 @@ def compute_hash(self) -> str:
2207
2210
return hash_str
2208
2211
2209
2212
def __post_init__ (self ):
2210
- if self .device == "auto" :
2213
+ if IS_IN_DOC_BUILD :
2214
+ self .device_type = "cpu"
2215
+ elif self .device == "auto" :
2211
2216
# Automated device type detection
2212
2217
from vllm .platforms import current_platform
2213
2218
self .device_type = current_platform .device_type
You can’t perform that action at this time.
0 commit comments