text-generation-webui icon indicating copy to clipboard operation
text-generation-webui copied to clipboard

ModuleNotFoundError: No module named 'torch._C'

Open karsontsang23 opened this issue 1 year ago • 0 comments

Describe the bug

┌───────────────────────────────────────── Traceback (most recent call last) ─────────────────────────────────────────┐ │ D:\chingcomputer\text-generation-webui\server.py:6 in │ │ │ │ 5 │ │ > 6 import accelerate # This early import makes Intel GPUs happy │ │ 7 │ │ │ │ C:\Users\Ching Nok.conda\envs\textgen\Lib\site-packages\accelerate_init_.py:3 in │ │ │ │ 2 │ │ > 3 from .accelerator import Accelerator │ │ 4 from .big_modeling import ( │ │ │ │ C:\Users\Ching Nok.conda\envs\textgen\Lib\site-packages\accelerate\accelerator.py:33 in │ │ │ │ 32 import torch │ │ > 33 import torch.utils.hooks as hooks │ │ 34 │ │ │ │ C:\Users\Ching Nok.conda\envs\textgen\Lib\site-packages\torch\utils_init_.py:4 in │ │ │ │ 3 │ │ > 4 from .throughput_benchmark import ThroughputBenchmark │ │ 5 from .cpp_backtrace import get_cpp_backtrace │ │ │ │ C:\Users\Ching Nok.conda\envs\textgen\Lib\site-packages\torch\utils\throughput_benchmark.py:2 in │ │ │ │ 1 │ │ > 2 import torch._C │ │ 3 │ └─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ ModuleNotFoundError: No module named 'torch._C'

Is there an existing issue for this?

  • [X] I have searched the existing issues

Reproduction

conda create -n textgen python=3.11 conda activate textgen pip3 install torch==2.2.1 torchvision==0.17.1 torchaudio==2.2.1 git clone https://github.com/oobabooga/text-generation-webui cd text-generation-webui pip install -r requirements_cpu_only_noavx2.txt pip install llama-cpp-python git clone https://github.com/PanQiWei/AutoGPTQ.git && cd AutoGPTQ pip install numpy gekko pandas pip install -vvv --no-build-isolation -e . cd,, python server.py

Screenshot

No response

Logs

(textgen) D:\chingcomputer\text-generation-webui>python server.py
┌───────────────────────────────────────── Traceback (most recent call last) ─────────────────────────────────────────┐
│ D:\chingcomputer\text-generation-webui\server.py:6 in <module>                                                      │
│                                                                                                                     │
│     5                                                                                                               │
│ >   6 import accelerate  # This early import makes Intel GPUs happy                                                 │
│     7                                                                                                               │
│                                                                                                                     │
│ C:\Users\Ching Nok\.conda\envs\textgen\Lib\site-packages\accelerate\__init__.py:3 in <module>                       │
│                                                                                                                     │
│    2                                                                                                                │
│ >  3 from .accelerator import Accelerator                                                                           │
│    4 from .big_modeling import (                                                                                    │
│                                                                                                                     │
│ C:\Users\Ching Nok\.conda\envs\textgen\Lib\site-packages\accelerate\accelerator.py:33 in <module>                   │
│                                                                                                                     │
│     32 import torch                                                                                                 │
│ >   33 import torch.utils.hooks as hooks                                                                            │
│     34                                                                                                              │
│                                                                                                                     │
│ C:\Users\Ching Nok\.conda\envs\textgen\Lib\site-packages\torch\utils\__init__.py:4 in <module>                      │
│                                                                                                                     │
│    3                                                                                                                │
│ >  4 from .throughput_benchmark import ThroughputBenchmark                                                          │
│    5 from .cpp_backtrace import get_cpp_backtrace                                                                   │
│                                                                                                                     │
│ C:\Users\Ching Nok\.conda\envs\textgen\Lib\site-packages\torch\utils\throughput_benchmark.py:2 in <module>          │
│                                                                                                                     │
│     1                                                                                                               │
│ >   2 import torch._C                                                                                               │
│     3                                                                                                               │
└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
ModuleNotFoundError: No module named 'torch._C'

(textgen) D:\chingcomputer\text-generation-webui>

System Info

windows AMD Athlon Silver 3050e with Radeon Graphics      1.40 GHz

karsontsang23 avatar Apr 19 '24 10:04 karsontsang23