Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RuntimeError: cannot cache function 'create_fsm_info': no locator available for file '/usr/local/lib/python3.10/dist-packages/outlines/fsm/regex.py' #983

Closed
pseudotensor opened this issue Jun 19, 2024 · 1 comment
Labels

Comments

@pseudotensor
Copy link

pseudotensor commented Jun 19, 2024

Describe the issue as clearly as possible:

Traceback (most recent call last):
  File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/usr/local/lib/python3.10/dist-packages/vllm/entrypoints/openai/api_server.py", line 26, in <module>
    from vllm.entrypoints.openai.serving_chat import OpenAIServingChat
  File "/usr/local/lib/python3.10/dist-packages/vllm/entrypoints/openai/serving_chat.py", line 20, in <module>
    from vllm.model_executor.guided_decoding import (
  File "/usr/local/lib/python3.10/dist-packages/vllm/model_executor/guided_decoding/__init__.py", line 5, in <module>
    from vllm.model_executor.guided_decoding.lm_format_enforcer_decoding import (
  File "/usr/local/lib/python3.10/dist-packages/vllm/model_executor/guided_decoding/lm_format_enforcer_decoding.py", line 15, in <module>
    from vllm.model_executor.guided_decoding.outlines_decoding import (
  File "/usr/local/lib/python3.10/dist-packages/vllm/model_executor/guided_decoding/outlines_decoding.py", line 15, in <module>
    from vllm.model_executor.guided_decoding.outlines_logits_processors import (
  File "/usr/local/lib/python3.10/dist-packages/vllm/model_executor/guided_decoding/outlines_logits_processors.py", line 24, in <module>
    from outlines.fsm.fsm import CFGFSM, FSM, RegexFSM
  File "/usr/local/lib/python3.10/dist-packages/outlines/__init__.py", line 2, in <module>
    import outlines.generate
  File "/usr/local/lib/python3.10/dist-packages/outlines/generate/__init__.py", line 1, in <module>
    from .api import SequenceGenerator
  File "/usr/local/lib/python3.10/dist-packages/outlines/generate/api.py", line 5, in <module>
    from outlines.fsm.fsm import FSMState
  File "/usr/local/lib/python3.10/dist-packages/outlines/fsm/fsm.py", line 9, in <module>
    from outlines.fsm.regex import create_fsm_index_tokenizer, make_deterministic_fsm
  File "/usr/local/lib/python3.10/dist-packages/outlines/fsm/regex.py", line 96, in <module>
    def create_fsm_info(
  File "/usr/local/lib/python3.10/dist-packages/numba/core/decorators.py", line 229, in wrapper
    disp.enable_caching()
  File "/usr/local/lib/python3.10/dist-packages/numba/core/dispatcher.py", line 856, in enable_caching
    self._cache = FunctionCache(self.py_func)
  File "/usr/local/lib/python3.10/dist-packages/numba/core/caching.py", line 601, in __init__
    self._impl = self._impl_class(py_func)
  File "/usr/local/lib/python3.10/dist-packages/numba/core/caching.py", line 337, in __init__
    raise RuntimeError("cannot cache function %r: no locator available "
RuntimeError: cannot cache function 'create_fsm_info': no locator available for file '/usr/local/lib/python3.10/dist-packages/outlines/fsm/regex.py'

Steps/code to reproduce the bug:

(h2ogpt) jon@gpu:~/h2ogpt$ docker run --runtime nvidia --gpus device=0 --shm-size 10.24g -p 7861:5000 -e VLLM_NCCL_SO_PATH=/usr/local/lib/python3.10/dist-packages/nvidia/nccl/lib/libnccl.so.2 -e NCCL_IGNORE_DISABLED_P2P=1 -v /etc/passwd:/etc/passwd:ro -v /etc/group:/etc/group:ro --user 1000 -v /home/jon/.cache/huggingface/hub:/home/jon/.cache/huggingface/hub -v /home/jon/.cache/huggingface/modules:/home/jon/.cache/huggingface/modules vllm/vllm-openai:v0.4.2 --port=5000 --host=0.0.0.0 --model=h2oai/h2ogpt-gm-oasst1-en-2048-falcon-7b-v2 --tensor-parallel-size=1 --seed 1234 --trust-remote-code --download-dir=/home/jon/.cache/huggingface/hub

Expected result:

If I don't pass --user or -u , then there is no failure, but the docker is running as root user, which I don't want.

Same failure happens with vllm 0.4.1 or 0.4.2 etc.

Error message:

Traceback (most recent call last):
  File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/usr/local/lib/python3.10/dist-packages/vllm/entrypoints/openai/api_server.py", line 26, in <module>
    from vllm.entrypoints.openai.serving_chat import OpenAIServingChat
  File "/usr/local/lib/python3.10/dist-packages/vllm/entrypoints/openai/serving_chat.py", line 20, in <module>
    from vllm.model_executor.guided_decoding import (
  File "/usr/local/lib/python3.10/dist-packages/vllm/model_executor/guided_decoding/__init__.py", line 5, in <module>
    from vllm.model_executor.guided_decoding.lm_format_enforcer_decoding import (
  File "/usr/local/lib/python3.10/dist-packages/vllm/model_executor/guided_decoding/lm_format_enforcer_decoding.py", line 15, in <module>
    from vllm.model_executor.guided_decoding.outlines_decoding import (
  File "/usr/local/lib/python3.10/dist-packages/vllm/model_executor/guided_decoding/outlines_decoding.py", line 15, in <module>
    from vllm.model_executor.guided_decoding.outlines_logits_processors import (
  File "/usr/local/lib/python3.10/dist-packages/vllm/model_executor/guided_decoding/outlines_logits_processors.py", line 24, in <module>
    from outlines.fsm.fsm import CFGFSM, FSM, RegexFSM
  File "/usr/local/lib/python3.10/dist-packages/outlines/__init__.py", line 2, in <module>
    import outlines.generate
  File "/usr/local/lib/python3.10/dist-packages/outlines/generate/__init__.py", line 1, in <module>
    from .api import SequenceGenerator
  File "/usr/local/lib/python3.10/dist-packages/outlines/generate/api.py", line 5, in <module>
    from outlines.fsm.fsm import FSMState
  File "/usr/local/lib/python3.10/dist-packages/outlines/fsm/fsm.py", line 9, in <module>
    from outlines.fsm.regex import create_fsm_index_tokenizer, make_deterministic_fsm
  File "/usr/local/lib/python3.10/dist-packages/outlines/fsm/regex.py", line 96, in <module>
    def create_fsm_info(
  File "/usr/local/lib/python3.10/dist-packages/numba/core/decorators.py", line 229, in wrapper
    disp.enable_caching()
  File "/usr/local/lib/python3.10/dist-packages/numba/core/dispatcher.py", line 856, in enable_caching
    self._cache = FunctionCache(self.py_func)
  File "/usr/local/lib/python3.10/dist-packages/numba/core/caching.py", line 601, in __init__
    self._impl = self._impl_class(py_func)
  File "/usr/local/lib/python3.10/dist-packages/numba/core/caching.py", line 337, in __init__
    raise RuntimeError("cannot cache function %r: no locator available "
RuntimeError: cannot cache function 'create_fsm_info': no locator available for file '/usr/local/lib/python3.10/dist-packages/outlines/fsm/regex.py'



### Outlines/Python version information:

what is in vllm 0.4.1 or 0.4.2 etc.

### Context for the issue:

_No response_
@pseudotensor
Copy link
Author

numba/numba#4908 (comment)

Apparently can set env to help.

'-e', 'NUMBA_CACHE_DIR=/tmp/',

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant