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

Decide the default matrix binding of the result by majority voting #108

Merged
merged 1 commit into from Jan 2, 2024

Conversation

yihming
Copy link
Member

@yihming yihming commented Jan 2, 2024

Issue

Currently, the default matrix binding (i.e. unidata._cur_matrix) is decided by taking the first key from the unidata.matrices map. This way has 2 drawbacks:

  1. It has nothing to do with the default matrix bindings of the source data objects. So even if all the sources use key a, it's still possible that the binding of the resulting data object is b.
  2. It sometimes could give different binding keys in different executions of the same code. This randomness is definitely not good for the analysis consistency.

Solution

This PR decides it in a more intuitive way: choose the matrix key used in the majority of the source data objects as the new default binding.

@yihming yihming requested review from bli25 and removed request for bli25 January 2, 2024 19:19
@yihming yihming merged commit b932ba3 into master Jan 2, 2024
3 checks passed
@yihming yihming deleted the fix-cur-matrix branch January 2, 2024 21:24
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

Successfully merging this pull request may close these issues.

None yet

1 participant