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

community: Corrected aload func to be asynchronous from webBaseLoader #28337

Merged
merged 15 commits into from
Dec 20, 2024

Conversation

yeounhak
Copy link
Contributor

@yeounhak yeounhak commented Nov 25, 2024

If no one reviews your PR within a few days, please @-mention one of baskaryan, efriis, eyurtsev, ccurme, vbarda, hwchase17.

Copy link

vercel bot commented Nov 25, 2024

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

Name Status Preview Comments Updated (UTC)
langchain ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 20, 2024 7:32pm

@dosubot dosubot bot added size:S This PR changes 10-29 lines, ignoring generated files. community Related to langchain-community Ɑ: doc loader Related to document loader module (not documentation) labels Nov 25, 2024
@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. and removed size:S This PR changes 10-29 lines, ignoring generated files. labels Nov 29, 2024
@yeounhak
Copy link
Contributor Author

yeounhak commented Dec 5, 2024

I understand you might be busy, but I would greatly appreciate it if you could provide comments on this PR.

@baskaryan @efriis @eyurtsev @ccurme @vbarda @hwchase17

Copy link
Member

@efriis efriis left a comment

Choose a reason for hiding this comment

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

tapping in @eyurtsev on the WebBaseLoader type ignore in #19936

I think this one might be funky for backwards compatibility reasons. I'm open to a breaking bugfix here

@eyurtsev
Copy link
Collaborator

Thanks for spending the time on this! I suggest a way to partially handle the problem without making a breaking change to this code since it's used by a lot of people as is

Copy link
Collaborator

@eyurtsev eyurtsev left a comment

Choose a reason for hiding this comment

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

sorry forgot to actually submit the comments

@yeounhak
Copy link
Contributor Author

yeounhak commented Dec 13, 2024

I will make the revisions based on the comments. Thank you!

@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. and removed size:M This PR changes 30-99 lines, ignoring generated files. labels Dec 18, 2024
@yeounhak
Copy link
Contributor Author

yeounhak commented Dec 18, 2024

✅ [What I've done]

  1. Implementing the load() function to execute concurrently in a new thread for Jupyter environment users.

  2. Keep aload() as a synchronous version with a warning message stating the following:

    • Users should replace aload() with load().
    • Or they can replace it with alazy_load().
  3. Add 'a' prefix for the scrape_all() function

⏳ [What remains to do]

  • Include a warning message specifying in which version the aload() function will be updated to an asynchronous version.
  • Deleting the aload() function definition from web_base.py when updating to a major version.

Could you please provide comments on the revised code?
Thank you in advance for your kind feedback! 🙏
@eyurtsev

Copy link
Collaborator

@ccurme ccurme left a comment

Choose a reason for hiding this comment

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

Thank you @yeounhak!

I've made some updates:

  • Keep .scrape_all as this is in the public API (your updating the tests in other integrations previews what developers would have to do if we deleted it).
  • Keep behavior of synchronous loading unchanged.
  • Update docs.

So in effect we are

  1. Implementing .ascrape_all (includes a slight refactor)
  2. Implementing .alazy_load
  3. Deprecating aload.

@dosubot dosubot bot added the lgtm PR looks good. Use to confirm that a PR is ready for merging. label Dec 20, 2024
@ccurme ccurme merged commit f38fc89 into langchain-ai:master Dec 20, 2024
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community Related to langchain-community Ɑ: doc loader Related to document loader module (not documentation) lgtm PR looks good. Use to confirm that a PR is ready for merging. size:L This PR changes 100-499 lines, ignoring generated files.
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants