mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-12 20:12:33 +00:00
Remove debug logging gate per review feedback
Simplified logging to always execute instead of gating behind isEnabledFor check. Main fix is using safe chunk.document_id property instead of direct metadata access.
This commit is contained in:
parent
1e5780b8dc
commit
3be1479bec
1 changed files with 5 additions and 7 deletions
|
|
@ -5,7 +5,6 @@
|
||||||
# the root directory of this source tree.
|
# the root directory of this source tree.
|
||||||
|
|
||||||
import asyncio
|
import asyncio
|
||||||
import logging # allow-direct-logging
|
|
||||||
import uuid
|
import uuid
|
||||||
from typing import Any
|
from typing import Any
|
||||||
|
|
||||||
|
|
@ -102,12 +101,11 @@ class VectorIORouter(VectorIO):
|
||||||
chunks: list[Chunk],
|
chunks: list[Chunk],
|
||||||
ttl_seconds: int | None = None,
|
ttl_seconds: int | None = None,
|
||||||
) -> None:
|
) -> None:
|
||||||
if logger.isEnabledFor(logging.DEBUG):
|
doc_ids = [chunk.document_id for chunk in chunks[:3]]
|
||||||
doc_ids = [chunk.document_id for chunk in chunks[:3]]
|
logger.debug(
|
||||||
logger.debug(
|
f"VectorIORouter.insert_chunks: {vector_db_id}, {len(chunks)} chunks, "
|
||||||
f"VectorIORouter.insert_chunks: {vector_db_id}, {len(chunks)} chunks, "
|
f"ttl_seconds={ttl_seconds}, chunk_ids={doc_ids}{' and more...' if len(chunks) > 3 else ''}"
|
||||||
f"ttl_seconds={ttl_seconds}, chunk_ids={doc_ids}{' and more...' if len(chunks) > 3 else ''}"
|
)
|
||||||
)
|
|
||||||
provider = await self.routing_table.get_provider_impl(vector_db_id)
|
provider = await self.routing_table.get_provider_impl(vector_db_id)
|
||||||
await provider.insert_chunks(vector_db_id, chunks, ttl_seconds)
|
await provider.insert_chunks(vector_db_id, chunks, ttl_seconds)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue