[mlpack-git] master: Correct warning for no output. (280feb5)

gitdub at mlpack.org gitdub at mlpack.org
Wed Jul 13 16:04:56 EDT 2016


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

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

commit 280feb567fc76b2a4687f9d0d9bb9600d3cee9dd
Author: Ryan Curtin <ryan at ratml.org>
Date:   Wed Jul 13 16:04:56 2016 -0400

    Correct warning for no output.


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

280feb567fc76b2a4687f9d0d9bb9600d3cee9dd
 src/mlpack/methods/hmm/hmm_generate_main.cpp | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/mlpack/methods/hmm/hmm_generate_main.cpp b/src/mlpack/methods/hmm/hmm_generate_main.cpp
index 739859c..af0e811 100644
--- a/src/mlpack/methods/hmm/hmm_generate_main.cpp
+++ b/src/mlpack/methods/hmm/hmm_generate_main.cpp
@@ -79,9 +79,9 @@ int main(int argc, char** argv)
   // Parse command line options.
   CLI::ParseCommandLine(argc, argv);
 
-  if (CLI::HasParam("output_file"))
-    Log::Warn << "--output_file (-o) is not specified; no results will be "
-        << "saved!" << endl;
+  if (!CLI::HasParam("output_file") && !CLI::HasParam("state_file"))
+    Log::Warn << "Neither --output_file nor --state_file are specified; no "
+        << "output will be saved!" << endl;
 
   // Set random seed.
   if (CLI::GetParam<int>("seed") != 0)




More information about the mlpack-git mailing list