Skip to content
This repository was archived by the owner on Aug 7, 2023. It is now read-only.

Conversation

jacobmanning
Copy link

There is a bug here causing predicted labels to be printed in incorrect order. Traversing a java.util.PriorityQueue with a range-based for loop does not guarantee traversal in sorted order. Fixed by converting PQ to array, sorting array with PQ.comparator(), and returning the results in sorted order.

More information on the undefined behavior of traversing PQ here.

There is a bug here causing predicted labels to be printed in arbitrary order.
Traversing a java.util.PriorityQueue with a range-based for loop does not
guarantee traversal in sorted order. Fixed by converting PQ to array, sorting
array with PQ.comparator(), and returning the results in sorted order.
@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here (e.g. I signed it!) and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

@jacobmanning
Copy link
Author

@googlebot I signed it!

@googlebot
Copy link

CLAs look good, thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants