Merge 8cb14eb84c into sapling-pr-archive-ehhuang

This commit is contained in:
ehhuang 2025-10-06 14:43:08 -07:00 committed by GitHub
commit 7c64faa55b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 10 additions and 6 deletions

View file

@ -32,7 +32,7 @@ from llama_stack.providers.utils.sqlstore.sqlstore import (
sqlstore_impl,
)
logger = get_logger(name=__name__, category="openai::conversations")
logger = get_logger(name=__name__, category="openai_conversations")
class ConversationServiceConfig(BaseModel):

View file

@ -31,12 +31,17 @@ CATEGORIES = [
"client",
"telemetry",
"openai_responses",
"openai_conversations",
"testing",
"providers",
"models",
"files",
"vector_io",
"tool_runtime",
"cli",
"post_training",
"scoring",
"tests",
]
UNCATEGORIZED = "uncategorized"
@ -261,11 +266,10 @@ def get_logger(
if root_category in _category_levels:
log_level = _category_levels[root_category]
else:
assert category == UNCATEGORIZED, (
"Unknown logging category: {category}. To resolve, choose a valid category from the CATEGORIES list or add it to the CATEGORIES list."
)
log_level = _category_levels.get("root", DEFAULT_LOG_LEVEL)
if category != UNCATEGORIZED:
logging.warning(
f"Unknown logging category: {category}. Falling back to default 'root' level: {log_level}"
)
logger.setLevel(log_level)
return logging.LoggerAdapter(logger, {"category": category})

View file

@ -9,7 +9,7 @@ from pathlib import Path
from llama_stack.log import get_logger
logger = get_logger(__name__, "tokenizer_utils")
logger = get_logger(__name__, "models")
def load_bpe_file(model_path: Path) -> dict[bytes, int]: