Skip to content

Commit ca8884f

Browse files
committed
lo
1 parent 45cf910 commit ca8884f

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

backend/onyx/background/indexing/run_indexing.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ def _run_indexing(
261261
3. Updates Postgres to record the indexed documents + the outcome of this run
262262
"""
263263
start_time = time.monotonic() # jsut used for logging
264-
264+
logger.error("Starting indexing run")
265265
with get_session_with_current_tenant() as db_session_temp:
266266
index_attempt_start = get_index_attempt(db_session_temp, index_attempt_id)
267267
if not index_attempt_start:
@@ -315,6 +315,7 @@ def _run_indexing(
315315
# don't go into "negative" time if we've never indexed before
316316
window_start = datetime.fromtimestamp(0, tz=timezone.utc)
317317

318+
logger.error("Getting most recent attempt")
318319
most_recent_attempt = next(
319320
iter(
320321
get_recent_completed_attempts_for_cc_pair(
@@ -326,6 +327,7 @@ def _run_indexing(
326327
),
327328
None,
328329
)
330+
logger.error(f"Most recent attempt: {most_recent_attempt}")
329331
# if the last attempt failed, try and use the same window. This is necessary
330332
# to ensure correctness with checkpointing. If we don't do this, things like
331333
# new slack channels could be missed (since existing slack channels are
@@ -361,6 +363,7 @@ def _run_indexing(
361363
httpx_client=HttpxPool.get("vespa"),
362364
)
363365

366+
logger.error("Building indexing pipeline")
364367
indexing_pipeline = build_indexing_pipeline(
365368
embedder=embedding_model,
366369
information_content_classification_model=information_content_classification_model,
@@ -782,7 +785,7 @@ def run_indexing_entrypoint(
782785
callback: IndexingHeartbeatInterface | None = None,
783786
) -> None:
784787
"""Don't swallow exceptions here ... propagate them up."""
785-
788+
logger.error("Starting indexing run: run_indexing_entrypoint")
786789
if is_ee:
787790
global_version.set_ee()
788791

backend/onyx/indexing/indexing_pipeline.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -721,6 +721,8 @@ def index_doc_batch(
721721
Returns a tuple where the first element is the number of new docs and the
722722
second element is the number of chunks."""
723723

724+
logger.error(f"index_doc_batch: {len(document_batch)} documents")
725+
724726
no_access = DocumentAccess.build(
725727
user_emails=[],
726728
user_groups=[],
@@ -1060,6 +1062,7 @@ def build_indexing_pipeline(
10601062
callback: IndexingHeartbeatInterface | None = None,
10611063
) -> IndexingPipelineProtocol:
10621064
"""Builds a pipeline which takes in a list (batch) of docs and indexes them."""
1065+
logger.error("Building indexing pipeline")
10631066
all_search_settings = get_active_search_settings(db_session)
10641067
if (
10651068
all_search_settings.secondary
@@ -1070,10 +1073,12 @@ def build_indexing_pipeline(
10701073
search_settings = all_search_settings.primary
10711074

10721075
multipass_config = get_multipass_config(search_settings)
1076+
logger.error(f"multipass_config: {multipass_config}")
10731077

10741078
enable_contextual_rag = (
10751079
search_settings.enable_contextual_rag or ENABLE_CONTEXTUAL_RAG
10761080
)
1081+
logger.error(f"enable_contextual_rag: {enable_contextual_rag}")
10771082
llm = None
10781083
if enable_contextual_rag:
10791084
llm = get_llm_for_contextual_rag(

0 commit comments

Comments
 (0)