Skip to content

[Bug]: KVTransferConfig's engine_id it not real random #18575

@lk-chen

Description

@lk-chen

Your current environment

The output of python collect_env.py
N/A

🐛 Describe the bug

from dataclasses import dataclass
import uuid

@dataclass
class Foo:
    id: str = str(uuid.uuid4())

if __name__ == "__main__":
    for _ in range(2):
        foo = Foo()
        print(foo.id)

    for _ in range(2):
        print(str(uuid.uuid4()))

or b5880c9

We decorate KVTransferConfig with dataclass and provide engine_id: str(uuid.uuid4()), this means if we create the config multiple times, the engine_id is actually identical. See above reproduction script.

This could be pitfall if people generate the config in a central place and launch multiple servers, like ray-project/ray#53092

Before submitting a new issue...

  • Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the documentation page, which can answer lots of frequently asked questions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions