Skip to content

AttributeError: module 'sglang' has no attribute 'set_default_backend' #1

Open

Description

@RoadTLife

exec command

python example.py --model_path /code/Qwen2.5-32B-Instruct/ --prompts_dir ./prompt/

Error info

Traceback (most recent call last):
  File "/code/Multiverse-Engine/example.py", line 55, in <module>
    main(args)
  File "/code/Multiverse-Engine/example.py", line 9, in main
    sgl.set_default_backend("vllm")
    ^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'sglang' has no attribute 'set_default_backend'

Env

sglang-0.4.6.post2

Activity

  1. Oasis-Git commented on Jun 25, 2025

    @Oasis-Git
    Contributor

    @RoadTLife
    Hi, can you run it as normal with this line commented? Since the backend problem should not influence the engine function, you may choose to comment this line.

  2. Oasis-Git commented on Jun 27, 2025

    @Oasis-Git
    Contributor

    Now we refactored the example inference section. Previously the import sglang line may introduce env bias to cause this error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions