Guest User

Untitled

a guest
Feb 19th, 2018
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.05 KB | None | 0 0
  1. diff --git a/src/mlpack/bindings/python/py_option.hpp b/src/mlpack/bindings/python/py_option.hpp
  2. index b25be68a4..e85e8fb52 100644
  3. --- a/src/mlpack/bindings/python/py_option.hpp
  4. +++ b/src/mlpack/bindings/python/py_option.hpp
  5. @@ -69,7 +69,8 @@ class PyOption
  6. data.value = boost::any(defaultValue);
  7.  
  8. // Restore the parameters for this program.
  9. - CLI::RestoreSettings(programName, false);
  10. + if (identifier != "verbose" && identifier != "copy_all_inputs")
  11. + CLI::RestoreSettings(programName, false);
  12.  
  13. // Set the function pointers that we'll need. All of these function
  14. // pointers will be used by both the program that generates the pyx, and
  15. @@ -94,7 +95,8 @@ class PyOption
  16. // import more than one .so that uses CLI, so we have to keep the options
  17. // separate. programName is a global variable from mlpack_main.hpp.
  18. CLI::Add(std::move(data));
  19. - CLI::StoreSettings(programName);
  20. + if (identifier != "verbose" && identifier != "copy_all_inputs")
  21. + CLI::StoreSettings(programName);
  22. CLI::ClearSettings();
  23. }
  24. };
Add Comment
Please, Sign In to add comment