[Minor] Fix logger and style (#2325)

This commit is contained in:
Lianmin Zheng
2024-12-02 20:45:53 -08:00
committed by GitHub
parent 480e38a733
commit 3ddb1c4679
3 changed files with 16 additions and 9 deletions

View File

@@ -16,6 +16,7 @@
import gc
import json
import logging
import time
from typing import Optional
import torch
@@ -129,7 +130,7 @@ class ModelRunner:
# Global vars
if server_args.show_time_cost:
enable_show_time_cost()
if server_args.disable_disk_cache:
if server_args.disable_outlines_disk_cache:
from outlines.caching import disable_cache
disable_cache()
@@ -623,8 +624,10 @@ class ModelRunner:
if self.server_args.disable_cuda_graph:
return
tic = time.time()
logger.info("Capture cuda graph begin. This can take up to several minutes.")
self.cuda_graph_runner = CudaGraphRunner(self)
logger.info(f"Capture cuda graph end. Time elapsed: {time.time() - tic:.2f}s")
def apply_torch_tp(self):
logger.info(f"Enabling torch tensor parallelism on {self.tp_size} devices.")