PygmalionAI / aphrodite-engine

PygmalionAI's large-scale inference engine
https://pygmalion.chat
GNU Affero General Public License v3.0
884 stars 96 forks source link

[Bug]: Running aphrodite throws ImportError #477

Open reuank opened 3 months ago

reuank commented 3 months ago

Your current environment

/usr/lib/python3/dist-packages/scipy/__init__.py:146: UserWarning: A NumPy version >=1.17.3 and <1.25.0 is required for this version of SciPy (detected version 1.25.2
  warnings.warn(f"A NumPy version >={np_minversion} and <{np_maxversion}"
PyTorch version: 2.3.0+cu121
Is debug build: False
CUDA used to build PyTorch: 12.1
ROCM used to build PyTorch: N/A
OS: Ubuntu 22.04.3 LTS (x86_64)
GCC version: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
Clang version: Could not collect
CMake version: version 3.29.3
Libc version: glibc-2.35
Python version: 3.10.12 (main, Nov 20 2023, 15:14:05) [GCC 11.4.0] (64-bit runtime)
Python platform: Linux-6.2.0-37-generic-x86_64-with-glibc2.35
Is CUDA available: True
CUDA runtime version: 12.2.140
CUDA_MODULE_LOADING set to: LAZY
GPU models and configuration: GPU 0: NVIDIA A10
Nvidia driver version: 535.129.03
cuDNN version: Could not collect
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: True
CPU:
Architecture:                       x86_64
CPU op-mode(s):                     32-bit, 64-bit
Address sizes:                      46 bits physical, 57 bits virtual
Byte Order:                         Little Endian
CPU(s):                             30
On-line CPU(s) list:                0-29
Vendor ID:                          GenuineIntel
Model name:                         Intel(R) Xeon(R) Platinum 8358 CPU @ 2.60GHz
CPU family:                         6
Model:                              106
Thread(s) per core:                 1
Core(s) per socket:                 1
Socket(s):                          30
Stepping:                           6
BogoMIPS:                           5187.93
Flags:                              fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon rep_good nopl xtopology cpuid tsc_known_freq pni pclmulqdq vmx ssse3 fma cx16 pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch cpuid_fault invpcid_single ssbd ibrs ibpb stibp ibrs_enhanced tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves wbnoinvd arat avx512vbmi umip pku ospke avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg avx512_vpopcntdq la57 rdpid fsrm md_clear arch_capabilities
Virtualization:                     VT-x
Hypervisor vendor:                  KVM
Virtualization type:                full
L1d cache:                          960 KiB (30 instances)
L1i cache:                          960 KiB (30 instances)
L2 cache:                           120 MiB (30 instances)
L3 cache:                           480 MiB (30 instances)
NUMA node(s):                       1
NUMA node0 CPU(s):                  0-29
Vulnerability Gather data sampling: Unknown: Dependent on hypervisor status
Vulnerability Itlb multihit:        Not affected
Vulnerability L1tf:                 Not affected
Vulnerability Mds:                  Not affected
Vulnerability Meltdown:             Not affected
Vulnerability Mmio stale data:      Vulnerable: Clear CPU buffers attempted, no microcode; SMT Host state unknown
Vulnerability Retbleed:             Not affected
Vulnerability Spec rstack overflow: Not affected
Vulnerability Spec store bypass:    Mitigation; Speculative Store Bypass disabled via prctl
Vulnerability Spectre v1:           Mitigation; usercopy/swapgs barriers and __user pointer sanitization
Vulnerability Spectre v2:           Mitigation; Enhanced IBRS, IBPB conditional, RSB filling, PBRSB-eIBRS SW sequence
Vulnerability Srbds:                Not affected
Vulnerability Tsx async abort:      Mitigation; TSX disabled
Versions of relevant libraries:
[pip3] flake8==4.0.1
[pip3] numpy==1.25.2
[pip3] torch==2.3.0
[pip3] torchvision==0.15.2
[pip3] triton==2.3.0
[conda] Could not collect ROCM Version: Could not collect
Aphrodite Version: N/A
Aphrodite Build Flags:
CUDA Archs: Not Set; ROCm: Disabled

🐛 Describe the bug

Hey there,

I tried to install aphrodite via pip an also by building it from source on a lambdacloud instance with an A10 GPU. Both processes did not throw any errors.

However, when running aphrodite run meta-llama/Meta-Llama-3-8B-Instruct or even just aphrodite, I get the following error:

/usr/lib/python3/dist-packages/scipy/__init__.py:146: UserWarning: A NumPy version >=1.17.3 and <1.25.0 is required for this version of SciPy (detected version 1.25.2
  warnings.warn(f"A NumPy version >={np_minversion} and <{np_maxversion}"
Traceback (most recent call last):
  File "/home/ubuntu/.local/bin/aphrodite", line 5, in <module>
    from aphrodite.endpoints.cli import main
  File "/home/ubuntu/ThinkBench/aphrodite-engine/aphrodite/__init__.py", line 2, in <module>
    from aphrodite.engine.async_aphrodite import AsyncAphrodite
  File "/home/ubuntu/ThinkBench/aphrodite-engine/aphrodite/engine/async_aphrodite.py", line 13, in <module>
    from aphrodite.engine.aphrodite_engine import AphroditeEngine
  File "/home/ubuntu/ThinkBench/aphrodite-engine/aphrodite/engine/aphrodite_engine.py", line 19, in <module>
    from aphrodite.engine.metrics import StatLogger, Stats
  File "/home/ubuntu/ThinkBench/aphrodite-engine/aphrodite/engine/metrics.py", line 7, in <module>
    from prometheus_client import (REGISTRY, Counter, Gauge, Histogram, Info,
ImportError: cannot import name 'disable_created_metrics' from 'prometheus_client' (/usr/lib/python3/dist-packages/prometheus_client/__init__.py)

I don't understand what causes this error. Am I missing something here? Could you help me to get to the bottom of it?

Best Leon

sgsdxzy commented 3 months ago

Looks like a version mismatch, could you try downgrading (or upgrading) prometheus-client?

AlpinDale commented 3 months ago

Seems like your aphrodite installation isn't being recognized in the environment;

image