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

Add benchmark script for mlpack_decision_tree #30

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Add benchmark script for mlpack_decision_tree #30

wants to merge 3 commits into from

Conversation

ThyrixYang
Copy link

related to #886 in mlpack

@mlpack-jenkins
Copy link
Collaborator

Can one of the admins verify this patch?

@zoq
Copy link
Member

zoq commented Mar 30, 2017

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.

@mlpack-jenkins
Copy link
Collaborator

Can one of the admins verify this patch?

@ThyrixYang
Copy link
Author

ThyrixYang commented Apr 30, 2017

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.

@zoq
Copy link
Member

zoq commented Apr 30, 2017

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

@rcurtin
Copy link
Member

rcurtin commented Jun 8, 2017

@mlpack-jenkins test this

@ThyrixYang
Copy link
Author

@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.

@zoq
Copy link
Member

zoq commented Jun 9, 2017

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.

@ThyrixYang
Copy link
Author

ThyrixYang commented Jun 10, 2017

@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.

@zoq
Copy link
Member

zoq commented Jun 10, 2017

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

@rcurtin
Copy link
Member

rcurtin commented Jun 13, 2017

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.

@zoq
Copy link
Member

zoq commented Jun 14, 2017

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.

@rcurtin
Copy link
Member

rcurtin commented Jul 1, 2017

@mlpack-jenkins test this

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.

4 participants