Hello. Le jeu. 3 nov. 2022 à 11:51, Dahiya, Anant <anan...@illinois.edu> a écrit : > > Hi, > > This is regarding the Issue Math-1651. The order of neurons in the neuron is > non deterministic as it uses a ConcurrentHashMap which does not store the > elements in any specific order.
Thanks for reporting the incorrect test. > > The junit org.apache.commons.math4.neuralnet.NetworkTest#testIterationOrder > in commons-math-neuralnet contradicts this behavior and checks if the neurons > in the neuron map are ordered in increasing order. It would be best to remove > this flaky test. > > I have raised a PR for the same : > https://github.com/apache/commons-math/pull/213 > [https://opengraph.githubassets.com/c766c85f43f29469acf1494ebeb40b6eb190b2bd072e8c61f589758f5be68866/apache/commons-math/pull/213]<https://github.com/apache/commons-math/pull/213> > [MATH-1651] fix flaky test in commons-math-neuralnet by anantdahiya8 · Pull > Request #213 · > apache/commons-math<https://github.com/apache/commons-math/pull/213> > ConcurrentHashMap does not guarantee the order of elements. Replacing it with > Collections.synchronizedMap which guarantees the order of the elements. Test > which were failing : org.apache.commons.ma... > github.com If I remember correctly, the intent of the test was to verify how the identifiers were created (starting from 0 and incrementing by 1). I've changed the test accordingly; please have a look at commit 50977290cdda79896ccb6304067341486fe104d2 (in "master"). Best regards, Gilles --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org For additional commands, e-mail: dev-h...@commons.apache.org