Skip to content
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

Merged
merged 4 commits into from
Jan 31, 2025
Merged

Add more airtable logging #3862

merged 4 commits into from
Jan 31, 2025

Conversation

Weves
Copy link
Contributor

@Weves Weves commented Jan 31, 2025

Description

Tries to make Airtable faster

https://linear.app/danswer/issue/DAN-1384/airtable-indexing-extremely-slow

How Has This Been Tested?

Ran locally, it was faster.

Backporting (check the box to trigger backport action)

Note: You have to check that the action passes, otherwise resolve the conflicts manually and tag the patches.

  • This PR should be backported (make sure to check that the backport attempt succeeds)
  • [Optional] Override Linear Check

Copy link

vercel bot commented Jan 31, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
internal-search ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 31, 2025 1:36am

Copy link
Contributor

@rkuo-danswer rkuo-danswer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comments inline

@@ -256,7 +296,7 @@ def from_db_model(
)


class RerankingModel:
class RerankingModel: #
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

empty comment?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed!

for doc in ctx.updatable_docs
]
logger.debug(f"Starting indexing process for documents: {doc_descriptors}")

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this make the line below ... "starting chunking" ... irrelevant?

Copy link
Contributor Author

Choose a reason for hiding this comment

The 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)

@@ -45,7 +46,17 @@ def __init__(
def run(self) -> GenerateDocumentsOutput:
"""Adds additional exception logging to the connector."""
try:
yield from self.doc_batch_generator
start = time.monotonic()
Copy link
Contributor

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.

Copy link
Contributor Author

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

@Weves Weves merged commit 288daa4 into main Jan 31, 2025
4 of 9 checks passed
@Weves Weves deleted the add-more-airtable-logging branch January 31, 2025 01:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants