7
7
import datetime
8
8
import os
9
9
10
- CONFIG_MAP_FILE = os .environ .get ("DYNAMIC_LORA_ROLLOUT_CONFIG" , "configmap.yaml" )
10
+ CONFIG_MAP_FILE = os .environ .get ("DYNAMIC_LORA_ROLLOUT_CONFIG" , "/config/ configmap.yaml" )
11
11
BASE_FIELD = "vLLMLoRAConfig"
12
12
logging .basicConfig (
13
13
level = logging .INFO , format = "%(asctime)s - %(levelname)s - %(filename)s:%(lineno)d - %(message)s" ,
@@ -165,11 +165,16 @@ def reconcile(self):
165
165
if not self .is_server_healthy :
166
166
logging .error (f"vllm server at { self .model_server } not healthy" )
167
167
return
168
+ invalid_adapters = ", " .join (str (a .id ) for a in self .ensure_exist_adapters & self .ensure_not_exist_adapters )
169
+ logging .warning (f"skipped adapters found in both `ensureExist` and `ensureNotExist` { invalid_adapters } " )
168
170
adapters_to_load = self .ensure_exist_adapters - self .ensure_not_exist_adapters
169
- logging .info (f"adapter to load { len (adapters_to_load )} , adapters_to_load" )
171
+ adapters_to_load_id = ", " .join (str (a .id ) for a in adapters_to_load )
172
+ logging .info (f"adapter to load { adapters_to_load_id } " )
170
173
for adapter in adapters_to_load :
171
174
self .load_adapter (adapter )
172
175
adapters_to_unload = self .ensure_not_exist_adapters - self .ensure_exist_adapters
176
+ adapters_to_unload_id = ", " .join (str (a .id ) for a in adapters_to_unload )
177
+ logging .info (f"adapters to unload { adapters_to_unload_id } " )
173
178
for adapter in adapters_to_unload :
174
179
self .unload_adapter (adapter )
175
180
@@ -184,7 +189,7 @@ async def main():
184
189
reconcilerInstance .reconcile ()
185
190
# observer = Observer()
186
191
logging .info (f"beginning watching of configmap { CONFIG_MAP_FILE } " )
187
- async for changes in awatch ('/config' ):
192
+ async for _ in awatch ('/config/configmap.yaml ' ):
188
193
logging .info (f"Config '{ CONFIG_MAP_FILE } ' modified!'" )
189
194
reconcilerInstance .reconcile ()
190
195
0 commit comments