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

Setting stable RandomState does not work #105

Open
williamfzc opened this issue Jun 1, 2024 · 0 comments
Open

Setting stable RandomState does not work #105

williamfzc opened this issue Jun 1, 2024 · 0 comments

Comments

@williamfzc
Copy link

williamfzc commented Jun 1, 2024

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.

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

No branches or pull requests

1 participant