vllm.v1.kv_offload.tiering.factory
¶
Classes:
-
SecondaryTierFactory–Registry for SecondaryTierManager implementations, resolved by type.
SecondaryTierFactory
¶
Registry for SecondaryTierManager implementations, resolved by type.
Mirrors OffloadingSpecFactory (vllm/v1/kv_offload/factory.py): built-in tiers are pre-registered below. External tiers can either register_tier() a friendly short name up front, or skip registration entirely and pass a module_path at lookup time (out-of-tree, no vLLM fork/patch required) -- see get_tier_class.
Methods:
-
get_tier_class–Get a secondary tier class by type.
Source code in vllm/v1/kv_offload/tiering/factory.py
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 | |
get_tier_class(tier_config)
classmethod
¶
Get a secondary tier class by type.
Parameters:
-
(tier_config¶dict) –Tier configuration dict. Must contain 'type' (the tier name or out-of-tree class name). If 'type' is not a registered tier and 'module_path' is given, the class is imported from there -- an out-of-tree tier needs no register_tier() call, just this module path in the config.
Returns:
-
type[SecondaryTierManager]–The secondary tier manager class.
Raises:
-
ValueError–If 'type' is missing, or is neither registered nor resolvable via module_path.
Source code in vllm/v1/kv_offload/tiering/factory.py
_import_class(name)
¶
Import a class by name.
If name contains a dot it is treated as a fully qualified path
(e.g. 'my_package.MyDetector'). Otherwise it is looked up in
the default backpressure module
(vllm.v1.kv_offload.tiering.backpressure), so short names like
'DropStorePolicy' or 'EMABackpressureDetector' work out of
the box.