[mlpack-svn] [MLPACK] #375: CoverTreeAlternateMetricTest occasionally fails

MLPACK Trac trac at coffeetalk-1.cc.gatech.edu
Sun Dec 7 23:07:34 EST 2014


#375: CoverTreeAlternateMetricTest occasionally fails
---------------------+------------------------------------------------------
 Reporter:  rcurtin  |        Owner:                                        
     Type:  defect   |       Status:  new                                   
 Priority:  minor    |    Milestone:  mlpack 1.1.0                          
Component:  mlpack   |     Keywords:  cover tree, tree, separation invariant
 Blocking:           |   Blocked By:                                        
---------------------+------------------------------------------------------
 Now and then, TreeTest/CoverTreeAlternateMetricTest fails.  I doubt that
 this bug will be easy or fun.  To reproduce:

  * Modify CoverTreeAlternateMetricTest in src/mlpack/tests/tree_test.cpp,
 adding the following lines to the beginning of the test:

 {{{
 size_t seed = std::time(NULL);
 math::RandomSeed(seed);
 }}}

  * Compile and run the test until you get a failure:

 {{{
 $ while(true); do bin/mlpack_test -t
 TreeTest/CoverTreeAlternateMetricTest; sleep 1; done
 }}}

  * When it fails, the random seed will have been printed.  So then you can
 modify your code and hardcode the seed.

 The failure is that two points at the same level in the tree do not
 satisfy the separation invariant.  It will be difficult to track down the
 exact reasons that allowed those two points to be nodes in the tree with
 the same scale.  It may be worth trying to reduce the random dataset to
 only include the points that cause the failure (which will be difficult),
 using a much much smaller random dataset (which will be easy but may take
 much longer to generate a failure, if at all), or seeing if the same
 dataset causes the same error in John Langford's original code.

 Since this will be particularly complex and it doesn't seem to be a
 problem that arises in most situations (and also that it doesn't actually
 affect the runtime results), I'm going to release 1.0.11 with this bug
 present and it can be fixed later.

-- 
Ticket URL: <https://trac.research.cc.gatech.edu/fastlab/ticket/375>
MLPACK <www.fast-lab.org>
MLPACK is an intuitive, fast, and scalable C++ machine learning library developed at Georgia Tech.


More information about the mlpack-svn mailing list