Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Misc] Heterogeneous GPU Optimizer Logging Clean Up #514

Merged
merged 1 commit into from
Dec 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions python/aibrix/aibrix/gpu_optimizer/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def start_serving_thread(watch_ver, deployment, watch_event: bool) -> bool:
watch_ver, deployment_name, namespace, lambda: new_deployment(deployment)
)
logger.info(
f'Deployment "{deployment_name}" added to the model monitor for "{model_name}"'
f'Deployment "{deployment_name}" found in watch version {watch_ver}, added to the model monitor for "{model_name}"'
)
return False

Expand Down Expand Up @@ -335,7 +335,7 @@ def main(signal, timeout):
logging.ERROR
) # Suppress kubenetes logs
logging.getLogger("pulp.apis.core").setLevel(logging.INFO) # Suppress pulp logs
logger = logging.getLogger("aibrix.gpuoptimizer")
logger = logging.getLogger("aibrix.gpu_optimizer")

timeout = 600
try:
Expand All @@ -356,10 +356,14 @@ def main(signal, timeout):
app,
host="0.0.0.0",
port=8080,
log_level="info",
log_config={
"version": 1,
"disable_existing_loggers": False,
"loggers": {"uvicorn.access": {"filters": ["dash_update_filter"]}},
"loggers": {
"uvicorn.access": {"filters": ["dash_update_filter"]},
"uvicorn.error": {"level": "INFO", "propagate": False},
},
"filters": {
"dash_update_filter": {
"()": ExcludePathsFilter,
Expand Down
8 changes: 5 additions & 3 deletions python/aibrix/aibrix/gpu_optimizer/load_monitor/monitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

Empty_Array: Iterable = []

logger = logging.getLogger("aibrix.gpuoptimizer.loadmonitor")
logger = logging.getLogger("aibrix.gpu_optimizer.load_monitor")

debug_gpu_profile = GPUProfile(
gpu="default", cost=1.0, tputs=[[100]], indexes=[[10], [10]]
Expand All @@ -53,7 +53,9 @@ def __init__(self, name: str, replicas: int = 1, min_replicas: int = 0):

@property
def cost(self):
return 0.0 if self.profile is None else self.profile.cost * self.replicas
return (
float("inf") if self.profile is None else self.profile.cost * self.replicas
)

def minimize(self):
"""Set replica to minimum mode."""
Expand Down Expand Up @@ -464,7 +466,7 @@ def _minimize(self):
self._cost = cost
self._lock.release()
logger.info(
f"{self.model_name} scaled to minimum, cost ${self._cost}: {list(self.deployments.values())}"
f"{self.model_name} scaled to minimum, total cost ${self._cost}. Detailed Configuration:{list(self.deployments.values())}"
)

@property
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

from aibrix.gpu_optimizer.optimizer import GPUProfile

logger = logging.getLogger("aibrix.gpuoptimizer.profile_reader")
logger = logging.getLogger("aibrix.gpu_optimizer.profile_reader")


class ProfileReader(Protocol):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def default_datasource(_: str) -> Optional[ModelMonitor]:
"lock": threading.Lock(),
}

logger = logging.getLogger("aibrix.gpuoptimizer.loadmonitor.visualizer")
logger = logging.getLogger("aibrix.gpu_optimizer.load_monitor.visualizer")


def get_debug_model_montior(
Expand Down
Loading