I can log in to the web demo right now, but it still has a bug:
OutOfMemoryError: CUDA out of memory. Tried to allocate 20.00 MiB. GPU 0 has a total capacity of 10.75 GiB of which 19.56 MiB is free. Including non-PyTorch memory, this process has 1.60 GiB memory in use. Process 682642 has 9.12 GiB memory in use. Of the allocated memory 1.30 GiB is allocated by PyTorch, and 110.28 MiB is reserved by PyTorch but unallocated. If reserved but unallocated memory is large try setting PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True to avoid fragmentation. See documentation for Memory Management (https://pytorch.org/docs/stable/notes/cuda.html#environment-variables)
Traceback:
File "/home/guoqi/miniconda3/lib/python3.12/site-packages/streamlit/runtime/scriptrunner/exec_code.py", line 88, in exec_func_with_error_handling
result = func()
^^^^^^
File "/home/guoqi/miniconda3/lib/python3.12/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 590, in code_to_exec
exec(code, module.dict)
File "/home/guoqi/autosurvey_online/main.py", line 202, in
login()
File "/home/guoqi/autosurvey_online/main.py", line 199, in login
main(st.session_state.get("username"))
File "/home/guoqi/autosurvey_online/main.py", line 120, in main
output = write(topic, 'claude-3-haiku-20240307', 6, 500, 60, True, api_key, api_url, db_path, embedding_model, custom_requirements)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/guoqi/autosurvey_online/main.py", line 24, in write
db = database(db_path=db_path, embedding_model=embedding_model)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/guoqi/autosurvey_online/src/database.py", line 17, in init
self.embedding_model = SentenceTransformer(embedding_model, trust_remote_code=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/guoqi/miniconda3/lib/python3.12/site-packages/sentence_transformers/SentenceTransformer.py", line 333, in init
self.to(device)
File "/home/guoqi/miniconda3/lib/python3.12/site-packages/torch/nn/modules/module.py", line 1174, in to
return self._apply(convert)
^^^^^^^^^^^^^^^^^^^^
File "/home/guoqi/miniconda3/lib/python3.12/site-packages/torch/nn/modules/module.py", line 780, in _apply
module._apply(fn)
File "/home/guoqi/miniconda3/lib/python3.12/site-packages/torch/nn/modules/module.py", line 780, in _apply
module._apply(fn)
File "/home/guoqi/miniconda3/lib/python3.12/site-packages/torch/nn/modules/module.py", line 780, in _apply
module._apply(fn)
[Previous line repeated 4 more times]
File "/home/guoqi/miniconda3/lib/python3.12/site-packages/torch/nn/modules/module.py", line 805, in _apply
param_applied = fn(param)
^^^^^^^^^
File "/home/guoqi/miniconda3/lib/python3.12/site-packages/torch/nn/modules/module.py", line 1160, in convert
return t.to(
^^^^^
Can you help me solve this problem?
Thank you very much!
Dear author,
I can log in to the web demo right now, but it still has a bug:
OutOfMemoryError: CUDA out of memory. Tried to allocate 20.00 MiB. GPU 0 has a total capacity of 10.75 GiB of which 19.56 MiB is free. Including non-PyTorch memory, this process has 1.60 GiB memory in use. Process 682642 has 9.12 GiB memory in use. Of the allocated memory 1.30 GiB is allocated by PyTorch, and 110.28 MiB is reserved by PyTorch but unallocated. If reserved but unallocated memory is large try setting PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True to avoid fragmentation. See documentation for Memory Management (https://pytorch.org/docs/stable/notes/cuda.html#environment-variables) Traceback: File "/home/guoqi/miniconda3/lib/python3.12/site-packages/streamlit/runtime/scriptrunner/exec_code.py", line 88, in exec_func_with_error_handling result = func() ^^^^^^ File "/home/guoqi/miniconda3/lib/python3.12/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 590, in code_to_exec exec(code, module.dict) File "/home/guoqi/autosurvey_online/main.py", line 202, in
login()
File "/home/guoqi/autosurvey_online/main.py", line 199, in login
main(st.session_state.get("username"))
File "/home/guoqi/autosurvey_online/main.py", line 120, in main
output = write(topic, 'claude-3-haiku-20240307', 6, 500, 60, True, api_key, api_url, db_path, embedding_model, custom_requirements)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/guoqi/autosurvey_online/main.py", line 24, in write
db = database(db_path=db_path, embedding_model=embedding_model)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/guoqi/autosurvey_online/src/database.py", line 17, in init
self.embedding_model = SentenceTransformer(embedding_model, trust_remote_code=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/guoqi/miniconda3/lib/python3.12/site-packages/sentence_transformers/SentenceTransformer.py", line 333, in init
self.to(device)
File "/home/guoqi/miniconda3/lib/python3.12/site-packages/torch/nn/modules/module.py", line 1174, in to
return self._apply(convert)
^^^^^^^^^^^^^^^^^^^^
File "/home/guoqi/miniconda3/lib/python3.12/site-packages/torch/nn/modules/module.py", line 780, in _apply
module._apply(fn)
File "/home/guoqi/miniconda3/lib/python3.12/site-packages/torch/nn/modules/module.py", line 780, in _apply
module._apply(fn)
File "/home/guoqi/miniconda3/lib/python3.12/site-packages/torch/nn/modules/module.py", line 780, in _apply
module._apply(fn)
[Previous line repeated 4 more times]
File "/home/guoqi/miniconda3/lib/python3.12/site-packages/torch/nn/modules/module.py", line 805, in _apply
param_applied = fn(param)
^^^^^^^^^
File "/home/guoqi/miniconda3/lib/python3.12/site-packages/torch/nn/modules/module.py", line 1160, in convert
return t.to(
^^^^^
Can you help me solve this problem?
Thank you very much!