Skip to content

Setting stable RandomState does not work #105

@williamfzc

Description

@williamfzc

Hello everyone :)

I am trying to configure a fixed random seed so that my program can consistently produce the same results for the same data. According to the API, if a fixed random seed is provided, the program should theoretically meet my requirements, but it does not in practice.

I found that in:

for node in __randomize(graph.nodes(), random_state):

the result of graph.nodes() itself is random. In this case, setting a fixed random seed is meaningless; it is still completely random and cannot be controlled.


So, to reach my goal, I have to edit the lib code to remove the random part:

for node in sorted(graph.nodes()):

the result will be almost stable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions