benchmarks icon indicating copy to clipboard operation
benchmarks copied to clipboard

Add benchmark script for mlpack_decision_tree

Open ThyrixYang opened this issue 7 years ago • 13 comments

related to #886 in mlpack

ThyrixYang avatar Mar 20 '17 12:03 ThyrixYang

Can one of the admins verify this patch?

mlpack-jenkins avatar Mar 25 '17 17:03 mlpack-jenkins

Can you add a simple test for the mlpack dtc benchmark script? Take a look at: https://github.com/zoq/benchmarks/blob/master/tests/benchmark_kernel_pca.py for how the test could look like.

zoq avatar Mar 30 '17 00:03 zoq

Can one of the admins verify this patch?

mlpack-jenkins avatar Apr 30 '17 02:04 mlpack-jenkins

Hi @zoq , I'm confused that I didn't find how these test script is used? I tried

python3 -m unittest benchmark_xxx.py

but not worked.

ThyrixYang avatar Apr 30 '17 02:04 ThyrixYang

You can either run make checksor python3 tests/tests.py. Note that you need python-xmlrunner to run the tests.

zoq avatar Apr 30 '17 18:04 zoq

@mlpack-jenkins test this

rcurtin avatar Jun 08 '17 20:06 rcurtin

@rcurtin I can run the benchmark by "make run", and when I run the benchmark test locally:

thyrix@y400:~/Downloads/benchmarks$ make checks
/usr/bin/python3 tests/tests.py

Running tests...
----------------------------------------------------------------------
....EE
======================================================================
ERROR [0.001s]: test_Constructor (benchmark_decision_tree.DecisionTree_SHOGUN_TEST)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/thyrix/Downloads/benchmarks/tests/benchmark_decision_tree.py", line 62, in setUp
    module = Loader.ImportModuleFromPath("methods/shogun/decision_tree.py")
  File "/home/thyrix/Downloads/benchmarks/util/loader.py", line 46, in ImportModuleFromPath
    tup = imp.find_module(modName, ['.'])
  File "/usr/lib/python3.5/imp.py", line 296, in find_module
    raise ImportError(_ERR_MSG.format(name), name=name)
ImportError: No module named 'decision_tree'

======================================================================
ERROR [0.000s]: test_RunMetrics (benchmark_decision_tree.DecisionTree_SHOGUN_TEST)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/thyrix/Downloads/benchmarks/tests/benchmark_decision_tree.py", line 62, in setUp
    module = Loader.ImportModuleFromPath("methods/shogun/decision_tree.py")
  File "/home/thyrix/Downloads/benchmarks/util/loader.py", line 46, in ImportModuleFromPath
    tup = imp.find_module(modName, ['.'])
  File "/usr/lib/python3.5/imp.py", line 296, in find_module
    raise ImportError(_ERR_MSG.format(name), name=name)
ImportError: No module named 'decision_tree'

----------------------------------------------------------------------
Ran 6 tests in 0.499s

FAILED (errors=2)

Generating XML reports...
Makefile:237: recipe for target '.checks' failed
make: *** [.checks] Error 1

So I think mlpack_decision_tree benchmark passed the test. Can you help me with the failure of jenkins test? I have no idea about the error now.

ThyrixYang avatar Jun 09 '17 04:06 ThyrixYang

The current jenkins setup uses mlpack 2.2.2 where you have to pass a seperate labels file: mlpack_decision_tree -t datasets/iris_train.csv [FATAL] Must specify --labels_file when --training_file is specified! this behavior was fixed in 2.2.3

So I think, what we can do here is to pass the labels file, and we should also update mlpack as soon as possible.

zoq avatar Jun 09 '17 11:06 zoq

@zoq I see. I added that feature when I was writing this benchmark script. Because all datasets(train file) in benchmark system use the last column as labels. And all other methods go with it well. So I think it's better to merge this pr after mlpack is updated and it passes the tests.

ThyrixYang avatar Jun 10 '17 13:06 ThyrixYang

Sounds reasonable, I'll update the mlpack package later today and rerun the test.

zoq avatar Jun 10 '17 13:06 zoq

Hmm, I think we can't update the mlpack package until the currently running mlpack benchmarks finish, unfortunately. I suppose it could be a few days then.

rcurtin avatar Jun 13 '17 22:06 rcurtin

If we update the package right now and run the checkout - all nodes job, it's not going to install the new version on the current machine that runs the mlpack benchmark until it finished right? Unless I missed something.

zoq avatar Jun 14 '17 10:06 zoq

@mlpack-jenkins test this

rcurtin avatar Jul 01 '17 20:07 rcurtin