From 7986763063d922968572cc0044227d9a6038ce57 Mon Sep 17 00:00:00 2001 From: Viktor Gal Date: Fri, 27 Jan 2017 10:57:50 +0800 Subject: [PATCH] [WIP] add debugging info why balanced cond tree fails --- appveyor.yml | 2 +- .../libshogun/balanced_conditional_probability_tree.cpp | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 2102db24feb..cf53bc0c5d8 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -28,5 +28,5 @@ build: test_script: - cd %APPVEYOR_BUILD_FOLDER%\build - - ctest --output-on-failure -C %CONFIGURATION% + - ctest --output-on-failure -VV -C %CONFIGURATION% - cd .. diff --git a/examples/undocumented/libshogun/balanced_conditional_probability_tree.cpp b/examples/undocumented/libshogun/balanced_conditional_probability_tree.cpp index 6138505f8e4..06f70192674 100644 --- a/examples/undocumented/libshogun/balanced_conditional_probability_tree.cpp +++ b/examples/undocumented/libshogun/balanced_conditional_probability_tree.cpp @@ -9,6 +9,7 @@ * * This example demonstrates use of the Vowpal Wabbit learning algorithm. */ +#include #include #include @@ -23,6 +24,7 @@ int main(int argc, char **argv) { init_shogun_with_defaults(); + try { const char* train_file_name = "../data/7class_example4_train.dense"; const char* test_file_name = "../data/7class_example4_test.dense"; CStreamingAsciiFile* train_file = new CStreamingAsciiFile(train_file_name); @@ -91,8 +93,13 @@ int main(int argc, char **argv) SG_UNREF(test_file); SG_UNREF(cpt); SG_UNREF(pred); - + } catch (ShogunException& e) { + std::cout << "got shogun exception: " << e.get_exception_string() << std::endl; + } catch(...) { + std::cout << "unknown exception!" << std::endl; + } exit_shogun(); + return 0; }