Skip to content
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
3 changes: 2 additions & 1 deletion examples/trtllm/common/base_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@


import asyncio
import os
import threading
from contextlib import asynccontextmanager
from dataclasses import dataclass
Expand All @@ -32,7 +33,7 @@

from .kv_cache_event_publisher import KVCacheEventPublisher

logger.set_level("info")
logger.set_level(os.getenv("DYN_TRTLLM_LOG_LEVEL", "info"))


class ChatProcessorMixin:
Expand Down
3 changes: 2 additions & 1 deletion examples/trtllm/common/generators.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@


import json
import os
import signal
import uuid

Expand All @@ -23,7 +24,7 @@
from tensorrt_llm.executor import CppExecutorError
from tensorrt_llm.logger import logger

logger.set_level("info")
logger.set_level(os.getenv("DYN_TRTLLM_LOG_LEVEL", "info"))


# TODO: support disaggregated as well
Expand Down
3 changes: 2 additions & 1 deletion examples/trtllm/common/kv_cache_event_publisher.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,12 @@
# limitations under the License.

import ctypes
import os
from ctypes import c_char_p, c_int64, c_uint32

from tensorrt_llm.logger import logger

logger.set_level("info")
logger.set_level(os.getenv("DYN_TRTLLM_LOG_LEVEL", "info"))


class DynamoResult:
Expand Down
3 changes: 2 additions & 1 deletion examples/trtllm/common/kv_router.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@


import enum
import os
import random
import traceback
from typing import AsyncIterator
Expand All @@ -25,7 +26,7 @@
from dynamo.llm import AggregatedMetrics, KvIndexer, KvMetricsAggregator, OverlapScores
from dynamo.runtime import dynamo_endpoint

logger.set_level("info")
logger.set_level(os.getenv("DYN_TRTLLM_LOG_LEVEL", "info"))


class RoutingStrategy(enum.Enum):
Expand Down
3 changes: 2 additions & 1 deletion examples/trtllm/common/processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

import asyncio
import json
import os
import time
from typing import (
Any,
Expand Down Expand Up @@ -51,7 +52,7 @@
)
from transformers import AutoTokenizer

logger.set_level("info")
logger.set_level(os.getenv("DYN_TRTLLM_LOG_LEVEL", "info"))


class ConversationMessage(TypedDict):
Expand Down
3 changes: 2 additions & 1 deletion examples/trtllm/common/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@


import asyncio
import os
import threading
import traceback
import weakref
Expand All @@ -23,7 +24,7 @@

from tensorrt_llm.logger import logger

logger.set_level("info")
logger.set_level(os.getenv("DYN_TRTLLM_LOG_LEVEL", "info"))


class ManagedThread(threading.Thread):
Expand Down
3 changes: 2 additions & 1 deletion examples/trtllm/disaggregated/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import asyncio
import copy
import json
import os

import uvloop
from common.base_engine import ChatProcessorMixin
Expand All @@ -32,7 +33,7 @@
from dynamo.llm import KvIndexer, KvMetricsAggregator
from dynamo.runtime import DistributedRuntime, dynamo_endpoint, dynamo_worker

logger.set_level("info")
logger.set_level(os.getenv("DYN_TRTLLM_LOG_LEVEL", "info"))


class DisaggServer(ChatProcessorMixin):
Expand Down
2 changes: 1 addition & 1 deletion examples/trtllm/disaggregated/worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
from dynamo.llm import KvMetricsPublisher
from dynamo.runtime import DistributedRuntime, dynamo_endpoint, dynamo_worker

logger.set_level("info")
logger.set_level(os.getenv("DYN_TRTLLM_LOG_LEVEL", "info"))


def update_args_from_disagg_config(
Expand Down
3 changes: 2 additions & 1 deletion examples/trtllm/monolith/dynamo_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
- This is only supposed to be used by dynamo-run launcher.
- It is part of bring-your-own-engine python feature in dynamo-run.
"""
import os
import sys
from pathlib import Path

Expand All @@ -40,7 +41,7 @@
from common.parser import parse_dynamo_run_args # noqa: E402
from common.protocol import AdaptedChatCompletionRequest # noqa: E402

logger.set_level("info")
logger.set_level(os.getenv("DYN_TRTLLM_LOG_LEVEL", "info"))


class DynamoTRTLLMEngine(BaseTensorrtLLMEngine):
Expand Down
3 changes: 2 additions & 1 deletion examples/trtllm/monolith/router.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
# limitations under the License.

import asyncio
import os

import uvloop
from common.base_engine import ChatProcessorMixin
Expand All @@ -31,7 +32,7 @@
from dynamo.llm import KvIndexer, KvMetricsAggregator
from dynamo.runtime import DistributedRuntime, dynamo_endpoint, dynamo_worker

logger.set_level("info")
logger.set_level(os.getenv("DYN_TRTLLM_LOG_LEVEL", "info"))


class Router(ChatProcessorMixin):
Expand Down
3 changes: 2 additions & 1 deletion examples/trtllm/monolith/worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
# limitations under the License.

import asyncio
import os

import uvloop
from common.base_engine import BaseTensorrtLLMEngine, TensorrtLLMEngineConfig
Expand All @@ -29,7 +30,7 @@
from dynamo.llm import KvMetricsPublisher
from dynamo.runtime import DistributedRuntime, dynamo_endpoint, dynamo_worker

logger.set_level("debug")
logger.set_level(os.getenv("DYN_TRTLLM_LOG_LEVEL", "info"))


class TensorrtLLMEngine(BaseTensorrtLLMEngine):
Expand Down