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

Resource limit: Oh No, Error running app. #2

Open
Lin-jun-xiang opened this issue Aug 31, 2023 · 1 comment
Open

Resource limit: Oh No, Error running app. #2

Lin-jun-xiang opened this issue Aug 31, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@Lin-jun-xiang
Copy link
Owner

Lin-jun-xiang commented Aug 31, 2023

Problem

  1. The free model will use HuggingFaceEmbeddings which cause lots of memory.
  2. The streamlit free server just have 1GB RAM.
  3. When there have multiple users using free model in the same time, our app will "over the resource limits".

Reference

Suggestion

  1. improve streamlit app performance
  2. RAM in streamlit
  3. Select a lower embedding model of HuggingFace
@Lin-jun-xiang Lin-jun-xiang added the bug Something isn't working label Aug 31, 2023
@Lin-jun-xiang Lin-jun-xiang changed the title Oh No, Error running app. Resource limit: Oh No, Error running app. Aug 31, 2023
@Lin-jun-xiang
Copy link
Owner Author

Lin-jun-xiang commented Sep 1, 2023

  • We use the windows task manager to track the memory usages.

  • The quesion from stackoverflow

  • Please note that even we declare model=None in app.py. While the Streamlit app's feature is that "any user interaction will cause the code to be rerun from top to bottom," Python does not immediately release resources, leading to resource consumption issues. (see stackoverflow)

  • Solution

    1. Use lower embedding to reduce the memory usage.
      Commit

    2. Use st.cache_recourse to avoid memory abnormal increase.
      Commit

@Lin-jun-xiang Lin-jun-xiang added the enhancement New feature or request label Sep 1, 2023
@Lin-jun-xiang Lin-jun-xiang reopened this Sep 5, 2023
@Lin-jun-xiang Lin-jun-xiang removed the bug Something isn't working label Sep 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant