You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I try running the app_launch.bat, I get the following error:
Traceback (most recent call last):
File "E:\rtx\ChatWithRTX\RAG\trt-llm-rag-windows-main\app.py", line 28, in
from trt_llama_api import TrtLlmAPI
File "E:\rtx\ChatWithRTX\RAG\trt-llm-rag-windows-main\trt_llama_api.py", line 42, in
from utils import (DEFAULT_HF_MODEL_DIRS, DEFAULT_PROMPT_TEMPLATES,
File "E:\rtx\ChatWithRTX\RAG\trt-llm-rag-windows-main\utils.py", line 22, in
import tensorrt_llm
File "E:\rtx\ChatWithRTX\env_nvd_rag\lib\site-packages\tensorrt_llm_init_.py", line 18, in
import tensorrt_llm.runtime as runtime
File "E:\rtx\ChatWithRTX\env_nvd_rag\lib\site-packages\tensorrt_llm\runtime_init_.py", line 22, in
from .model_runner import ModelRunner
File "E:\rtx\ChatWithRTX\env_nvd_rag\lib\site-packages\tensorrt_llm\runtime\model_runner.py", line 24, in
from .. import profiler
File "E:\rtx\ChatWithRTX\env_nvd_rag\lib\site-packages\tensorrt_llm\profiler.py", line 46, in
elif pynvml.version < '11.5.0':
AttributeError: module 'pynvml' has no attribute 'version'
Press any key to continue . . .
The fix was to:
Edit the file at "[your_installation]\ChatWithRTX\env_nvd_rag\lib\site-packages\tensorrt_llm\profiler.py"
Add "import pkg_resources" at top of file
import torch import tensorrt as trt import pkg_resources
And replace the lines from 46 onwards with:
if pynvml is None:
logger.warning(
"A required package 'psutil' is not installed. Will not "
"monitor the device memory usages. Please install the package "
"first, e.g, 'pip install pynvml>=11.5.0'.")
try:
pynvml_version = pkg_resources.get_distribution("pynvml").version
if pynvml_version < '11.5.0':
logger.warning(f'Found pynvml=={pynvml_version}. Please use pynvml>=11.5.0 to get accurate memory usage')
# Legacy support or alternative behavior
_device_get_memory_info_fn = pynvml.nvmlDeviceGetMemoryInfo
else:
_device_get_memory_info_fn = partial(pynvml.nvmlDeviceGetMemoryInfo,
version=pynvml.nvmlMemory_v2)
except pkg_resources.DistributionNotFound:
logger.warning("pynvml is not installed. Please install it using `pip install pynvml>=11.5.0`.")
pynvml_version = None
The text was updated successfully, but these errors were encountered:
When I try running the app_launch.bat, I get the following error:
Traceback (most recent call last):
File "E:\rtx\ChatWithRTX\RAG\trt-llm-rag-windows-main\app.py", line 28, in
from trt_llama_api import TrtLlmAPI
File "E:\rtx\ChatWithRTX\RAG\trt-llm-rag-windows-main\trt_llama_api.py", line 42, in
from utils import (DEFAULT_HF_MODEL_DIRS, DEFAULT_PROMPT_TEMPLATES,
File "E:\rtx\ChatWithRTX\RAG\trt-llm-rag-windows-main\utils.py", line 22, in
import tensorrt_llm
File "E:\rtx\ChatWithRTX\env_nvd_rag\lib\site-packages\tensorrt_llm_init_.py", line 18, in
import tensorrt_llm.runtime as runtime
File "E:\rtx\ChatWithRTX\env_nvd_rag\lib\site-packages\tensorrt_llm\runtime_init_.py", line 22, in
from .model_runner import ModelRunner
File "E:\rtx\ChatWithRTX\env_nvd_rag\lib\site-packages\tensorrt_llm\runtime\model_runner.py", line 24, in
from .. import profiler
File "E:\rtx\ChatWithRTX\env_nvd_rag\lib\site-packages\tensorrt_llm\profiler.py", line 46, in
elif pynvml.version < '11.5.0':
AttributeError: module 'pynvml' has no attribute 'version'
Press any key to continue . . .
The fix was to:
Edit the file at "[your_installation]\ChatWithRTX\env_nvd_rag\lib\site-packages\tensorrt_llm\profiler.py"
Add "import pkg_resources" at top of file
import torch import tensorrt as trt import pkg_resources
And replace the lines from 46 onwards with:
The text was updated successfully, but these errors were encountered: