mattb512 commited on
Commit
fe200f5
1 Parent(s): 157fd87

add debugging statements

Browse files
Files changed (2) hide show
  1. interactive_demo.py +5 -1
  2. serve/controller.py +2 -1
interactive_demo.py CHANGED
@@ -257,8 +257,11 @@ def interactive_demo(cfg: DemoConfig):
257
  # Build the VLM --> Download/Load Pretrained Model from Checkpoint
258
  overwatch.info("Initializing VLM =>> Bundling Models, Image Processors, and Tokenizer")
259
  hf_token = cfg.hf_token.read_text().strip() if isinstance(cfg.hf_token, Path) else os.environ[cfg.hf_token]
 
 
 
260
  vlm = load_vlm(cfg.model_family, cfg.model_id, cfg.run_dir, hf_token=hf_token)
261
- print("model loaded")
262
 
263
  global worker
264
  global limit_model_concurrency
@@ -266,6 +269,7 @@ def interactive_demo(cfg: DemoConfig):
266
  worker = ModelWorker(
267
  cfg.controller_address, cfg.worker_address, worker_id, cfg.no_register, vlm, cfg.model_name
268
  )
 
269
  uvicorn.run(app, host=cfg.host, port=cfg.port, log_level="debug")
270
 
271
 
 
257
  # Build the VLM --> Download/Load Pretrained Model from Checkpoint
258
  overwatch.info("Initializing VLM =>> Bundling Models, Image Processors, and Tokenizer")
259
  hf_token = cfg.hf_token.read_text().strip() if isinstance(cfg.hf_token, Path) else os.environ[cfg.hf_token]
260
+
261
+ overwatch.info(f"*** hf_token {hf_token[:4]}")
262
+
263
  vlm = load_vlm(cfg.model_family, cfg.model_id, cfg.run_dir, hf_token=hf_token)
264
+ overwatch.info("*** model loaded")
265
 
266
  global worker
267
  global limit_model_concurrency
 
269
  worker = ModelWorker(
270
  cfg.controller_address, cfg.worker_address, worker_id, cfg.no_register, vlm, cfg.model_name
271
  )
272
+ overwatch.info("*** starting uvicorn")
273
  uvicorn.run(app, host=cfg.host, port=cfg.port, log_level="debug")
274
 
275
 
serve/controller.py CHANGED
@@ -246,6 +246,7 @@ app = FastAPI()
246
  @app.post("/register_worker")
247
  async def register_worker(request: Request):
248
  data = await request.json()
 
249
  controller.register_worker(data["worker_name"], data["check_heart_beat"], data.get("worker_status", None))
250
 
251
 
@@ -295,4 +296,4 @@ if __name__ == "__main__":
295
  logger.info(f"args: {args}")
296
 
297
  controller = Controller(args.dispatch_method)
298
- uvicorn.run(app, host=args.host, port=args.port, log_level="info")
 
246
  @app.post("/register_worker")
247
  async def register_worker(request: Request):
248
  data = await request.json()
249
+ logger.info(f"data = {data}")
250
  controller.register_worker(data["worker_name"], data["check_heart_beat"], data.get("worker_status", None))
251
 
252
 
 
296
  logger.info(f"args: {args}")
297
 
298
  controller = Controller(args.dispatch_method)
299
+ uvicorn.run(app, host=args.host, port=args.port, log_level="debug")