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

Fix missing numpy dependency in pyproject.toml #524

Merged
merged 1 commit into from
Jun 10, 2024

Conversation

fpreiss
Copy link
Contributor

@fpreiss fpreiss commented Jun 10, 2024

numpy is currently listed as an optional dependency. With the current version on pypi and on the master branch, sglang will fail to import without numpy installed. See the log output below:

Python 3.11.9 (main, May 27 2024, 20:31:01) [GCC 14.1.1 20240507] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import sglang
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/fpreiss/Downloads/github/sglang/python/sglang/__init__.py", line 4, in <module>
    from sglang.api import (
  File "/home/fpreiss/Downloads/github/sglang/python/sglang/api.py", line 7, in <module>
    from sglang.backend.base_backend import BaseBackend
  File "/home/fpreiss/Downloads/github/sglang/python/sglang/backend/base_backend.py", line 4, in <module>
    from sglang.lang.interpreter import StreamExecutor
  File "/home/fpreiss/Downloads/github/sglang/python/sglang/lang/interpreter.py", line 34, in <module>
    from sglang.utils import (
  File "/home/fpreiss/Downloads/github/sglang/python/sglang/utils.py", line 15, in <module>
    import numpy as np
ModuleNotFoundError: No module named 'numpy'

This commit proposes a simple fix by requiring numpy in the pyproject.toml.

@merrymercy merrymercy merged commit 542bc73 into sgl-project:main Jun 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants