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[patch]: speed up import times in the community package #18928

Merged
merged 2 commits into from
Mar 11, 2024

Conversation

leo-gan
Copy link
Collaborator

@leo-gan leo-gan commented Mar 11, 2024

This PR speeds up import times in the community package

Copy link

vercel bot commented Mar 11, 2024

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

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
langchain ⬜️ Ignored (Inspect) Visit Preview Mar 11, 2024 8:28pm

@leo-gan leo-gan marked this pull request as ready for review March 11, 2024 18:08
@dosubot dosubot bot added size:XXL This PR changes 1000+ lines, ignoring generated files. Ɑ: doc loader Related to document loader module (not documentation) 🔌: anthropic Primarily related to Anthropic integrations 🤖:refactor A large refactor of a feature(s) or restructuring of many files labels Mar 11, 2024
@leo-gan leo-gan requested a review from eyurtsev March 11, 2024 18:10
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.

Good to merge if you're OK removing the extra imports.

It's hard to tell whether those are meant to be publicly exposed or not. We can revisit in a separate PR -- i would need more time to review though since I haven't worked with chat loaders much.

@eyurtsev eyurtsev self-assigned this Mar 11, 2024
@leo-gan leo-gan requested a review from eyurtsev March 11, 2024 20:30
@eyurtsev eyurtsev changed the title community: flattening imports 2 community: speed up imports across all of community Mar 11, 2024
@eyurtsev eyurtsev changed the title community: speed up imports across all of community community[patch]: speed up import times in the community package Mar 11, 2024
@eyurtsev eyurtsev merged commit 11195cf into langchain-ai:master Mar 11, 2024
59 checks passed
@eyurtsev
Copy link
Collaborator

Thanks @leo-gan

@leo-gan
Copy link
Collaborator Author

leo-gan commented Mar 11, 2024

@eyurtsev Thanks!

@leo-gan leo-gan deleted the community-flattening-imports-2 branch March 11, 2024 20:39
bechbd pushed a commit to bechbd/langchain that referenced this pull request Mar 29, 2024
gkorland pushed a commit to FalkorDB/langchain that referenced this pull request Mar 30, 2024
@pierreveron
Copy link
Contributor

Hey @leo-gan and @eyurtsev, this PR removes the ability to have linting on the imports on VSCode (see image below). Using lazy loading with __get_attr__ seems not to be well supported (there's an old open PR on Pylint about this). Do you have a solution to provide?

image

@eyurtsev
Copy link
Collaborator

eyurtsev commented Apr 5, 2024

could you check if this works for you: #20050

(if you're comfortable making the change locally -- this seems to resolve issues for me in pycharm)

hinthornw pushed a commit that referenced this pull request Apr 26, 2024
)

This PR speeds up import times in the community package
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔌: anthropic Primarily related to Anthropic integrations Ɑ: doc loader Related to document loader module (not documentation) 🤖:refactor A large refactor of a feature(s) or restructuring of many files size:XXL This PR changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants