[mlpack-git] master: Warn when the user does not specify a file to test but asks for output. (aac0b7f)

gitdub at mlpack.org gitdub at mlpack.org
Wed Jul 13 11:16:35 EDT 2016


Repository : https://github.com/mlpack/mlpack
On branch  : master
Link       : https://github.com/mlpack/mlpack/compare/59bc0b32630a3ad786706993f4d5e8b087f1c702...0d9a0e263a32b99d8dcf5d2723b3b92c67e669fc

>---------------------------------------------------------------

commit aac0b7fd054f9330b9345f6dc4190fd1623f0538
Author: Ryan Curtin <ryan at ratml.org>
Date:   Wed Jul 13 11:16:35 2016 -0400

    Warn when the user does not specify a file to test but asks for output.


>---------------------------------------------------------------

aac0b7fd054f9330b9345f6dc4190fd1623f0538
 src/mlpack/methods/adaboost/adaboost_main.cpp | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/mlpack/methods/adaboost/adaboost_main.cpp b/src/mlpack/methods/adaboost/adaboost_main.cpp
index b4dc309..b90d7e6 100644
--- a/src/mlpack/methods/adaboost/adaboost_main.cpp
+++ b/src/mlpack/methods/adaboost/adaboost_main.cpp
@@ -275,6 +275,12 @@ int main(int argc, char *argv[])
         << "no results will be saved." << endl;
   }
 
+  if (CLI::HasParam("output_file") && !CLI::HasParam("test_file"))
+  {
+    Log::Warn << "--output_file ignored because --test_file is not specified."
+        << endl;
+  }
+
   AdaBoostModel m;
   if (CLI::HasParam("training_file"))
   {




More information about the mlpack-git mailing list