PygmalionAI / aphrodite-engine

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

AttributeError: 'NoneType' object has no attribute 'fs' at fresh install #8

Closed AWAS666 closed 10 months ago

AWAS666 commented 10 months ago

I installed everything like the readme said, ran into this error, reinstalled, still the same thing. What could that be, appreciate the help?

(aphrodite) user_name@ai-rig:~/aphrodite-engine$ python -m aphrodite.endpoints.openai.api_server --help
Traceback (most recent call last):
  File "/home/user_name/miniconda3/envs/aphrodite/lib/python3.10/runpy.py", line 187, in _run_module_as_main
    mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
  File "/home/user_name/miniconda3/envs/aphrodite/lib/python3.10/runpy.py", line 110, in _get_module_details
    __import__(pkg_name)
  File "/home/user_name/aphrodite-engine/aphrodite/__init__.py", line 2, in <module>
    from aphrodite.engine.async_aphrodite import AsyncAphrodite
  File "/home/user_name/aphrodite-engine/aphrodite/engine/async_aphrodite.py", line 7, in <module>
    from aphrodite.engine.aphrodite_engine import AphroditeEngine
  File "/home/user_name/aphrodite-engine/aphrodite/engine/aphrodite_engine.py", line 8, in <module>
    from aphrodite.engine.ray_tools import initialize_cluster, ray, RayWorker
  File "/home/user_name/aphrodite-engine/aphrodite/engine/ray_tools.py", line 9, in <module>
    from ray.air.util.torch_dist import TorchDistributedWorker
  File "/home/user_name/miniconda3/envs/aphrodite/lib/python3.10/site-packages/ray/air/__init__.py", line 1, in <module>
    from ray.air.checkpoint import Checkpoint
  File "/home/user_name/miniconda3/envs/aphrodite/lib/python3.10/site-packages/ray/air/checkpoint.py", line 22, in <module>
    from ray.air._internal.remote_storage import (
  File "/home/user_name/miniconda3/envs/aphrodite/lib/python3.10/site-packages/ray/air/_internal/remote_storage.py", line 142, in <module>
    _cached_fs: Dict[tuple, Tuple[float, pyarrow.fs.FileSystem]] = {}
AttributeError: 'NoneType' object has no attribute 'fs'
AlpinDale commented 10 months ago

Hi. What's your hardware? Also please describe how to reproduce the error, e.g. did you run Aphrodite through a conda env?

AWAS666 commented 10 months ago

Yes I run it through conda env, basically just like the installation instructions say. As soon as I try to start the server, no matter which arguments, it spits out the error.

As for the hardware: OS: Ubuntu desktop 22.04 lts CPU: 8700k 32 GB Ram, Samsung SSD So rather normal so far, but: 2x 3090 as the GPU

I could retry it later with just a single GPU plugged in.

AlpinDale commented 10 months ago

Yes I run it through conda env, basically just like the installation instructions say. As soon as I try to start the server, no matter which arguments, it spits out the error.

As for the hardware: OS: Ubuntu desktop 22.04 lts CPU: 8700k 32 GB Ram, Samsung SSD So rather normal so far, but: 2x 3090 as the GPU

I could retry it later with just a single GPU plugged in.

The GPUs shouldn't be an issue really. I'll try it out on the same hardware and get back to you with results. Can you make a new conda env and try again in the meantime?

AWAS666 commented 10 months ago

The GPUs shouldn't be an issue really. I'll try it out on the same hardware and get back to you with results. Can you make a new conda env and try again in the meantime?

I already tried it two times as I was also setting up something else in the background the first time around, but both resulted in the same error.

AlpinDale commented 10 months ago

The GPUs shouldn't be an issue really. I'll try it out on the same hardware and get back to you with results. Can you make a new conda env and try again in the meantime?

I already tried it two times as I was also setting up something else in the background the first time around, but both resulted in the same error.

I just rented 2x 3090s on runpod and received the exact same error (it works on 8x and 4x A40s so multi-GPU isn't an issue). I'll run some more tests to see what's wrong, will keep you updated if I find out what the problem is.

AWAS666 commented 10 months ago

Maybe this here helps: https://github.com/ray-project/ray/issues/25952

As it calls .fs of pyarrow, so maybe install it to double-check? It might do some fancy import magic which is why it isn't thrown earlier, but I'm only guessing. Can try it myself later in the day...

Relevant part of the code in ray

AlpinDale commented 10 months ago

Maybe this here helps: ray-project/ray#25952

As it calls .fs of pyarrow, so maybe install it to double-check? It might do some fancy import magic which is why it isn't thrown earlier, but I'm only guessing. Can try it myself later in the day...

Relevant part of the code in ray

Can confirm that pip install pyarrow solves this. Thanks for pointing that out!

AlpinDale commented 10 months ago

Latest commit 592ee204a658f82f1467d76e25d185054f1e27f0 should solve this. Marking this issue as complete.