-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Add more airtable logging #3862
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -380,6 +380,15 @@ def index_doc_batch( | |
new_docs=0, total_docs=len(filtered_documents), total_chunks=0 | ||
) | ||
|
||
doc_descriptors = [ | ||
{ | ||
"doc_id": doc.id, | ||
"doc_length": doc.get_total_char_length(), | ||
} | ||
for doc in ctx.updatable_docs | ||
] | ||
logger.debug(f"Starting indexing process for documents: {doc_descriptors}") | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Does this make the line below ... "starting chunking" ... irrelevant? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. imo its fine to keep it in (lets you know that chunking is the first step, although no strong opinion) |
||
logger.debug("Starting chunking") | ||
chunks: list[DocAwareChunk] = chunker.chunk(ctx.updatable_docs) | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in the past i've seen that items yielded from generators in a loop are lazily evaluated (aka not processed until first accessed in the loop. Just wanted to double check that the timings printed here are indeed working correctly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it does work, not sure exactly the standard behavior here though