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
Test for symmetric edge flow betweenness partition #7251
Conversation
test_edge_current_flow_betweenness_partition
assert len(C) == len(answer) | ||
for s in answer: | ||
assert s in C | ||
answers = [[{1, 2}, {4, 5, 6}, {3}, {0}], [{0, 1, 2}, {5, 6}, {3}, {4}]] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any special reason why the partitions on the barbells have to contain specific nodes? For example, isn't [{0, 2}, {4, 5, 6}, {3}, {1}]
(swapping nodes 0 and 1) just as valid as the first listed option? If so, then it might be good to include as a possible answer for completeness' sake. Applying the same pattern (swapping nodes in the other bell) would give more equally valid partitionings.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
instead of adding all of the valid solutions we can instead try setting the kind of random algo we want to use for the OS(something like this: https://stackoverflow.com/questions/47199415/is-set-seed-consistent-over-different-versions-of-r-and-ubuntu/56381613#56381613, i was trying to search for a random.seed
like thing for OSs). But, I'm not sure if this can be done in the github workflow. What do you think?
[EDIT]
From the discussion(meet): it is probably not an OS's seed-related issue and has to do with the set partitioning. To tackle this we should either add all the valid solutions or use some other graph type.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's go ahead and get these in to unblock the downstream CI. The other valid solutions may need to be revisited when there's yet another new/changed OS ins CI!
Add more valid partitions to test cases
closes networkx/nx-parallel#36