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

[ENG-586] Moved imports of langchain to speed up rasa --help #12930

Merged
merged 3 commits into from
Oct 26, 2023

Conversation

tabergma
Copy link
Contributor

@tabergma tabergma commented Oct 20, 2023

Proposed changes:

  • Avoid global import of langchain as this increase the loading time when doing rasa --help
  • Fixes ENG-586

rasa --help take < 1 second now:
Screenshot 2023-10-20 at 13 41 24

Status (please check what you already did):

  • added some tests for the functionality
  • updated the documentation
  • updated the changelog (please check changelog for instructions)
  • reformat files using black (please check Readme for instructions)

@tabergma tabergma requested a review from a team as a code owner October 20, 2023 10:56
@tabergma tabergma changed the title Moved imports of langchain to speed up rasa --help [ENG-586] Moved imports of langchain to speed up rasa --help Oct 20, 2023
@sonarcloud
Copy link

sonarcloud bot commented Oct 23, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug C 4 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot E 2 Security Hotspots
Code Smell A 54 Code Smells

0.0% 0.0% Coverage
0.8% 0.8% Duplication

warning The version of Java (11.0.20) you have used to run this analysis is deprecated and we will stop accepting it soon. Please update to at least Java 17.
Read more here

@tabergma tabergma requested review from varunshankar and removed request for twerkmeister October 23, 2023 12:13
Copy link
Contributor

@djcowley djcowley left a comment

Choose a reason for hiding this comment

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

Looks good to me.

Note: There is a ticket to work on caching the llm_factory call which will address any issues around repeatedly loading the LLM.
https://rasahq.atlassian.net/browse/ENG-482

@tabergma tabergma merged commit e0f2cca into dm2 Oct 26, 2023
101 checks passed
@tabergma tabergma deleted the ENG-586-langchain-imports branch October 26, 2023 07:59
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