Permalink
Browse files

Update to test and utilities

Added some updates to docstrings and test unit parameters.
  • Loading branch information...
1 parent 58577fd commit baa5074f237b87ca55257f72601c93ddbfe7465d @michaelhush committed Nov 24, 2016
Showing with 4 additions and 2 deletions.
  1. +1 −1 mloop/controllers.py
  2. +2 −0 mloop/utilities.py
  3. +1 −1 tests/test_units.py
View
@@ -675,7 +675,7 @@ def _optimization_routine(self):
''' '''
Overrides _optimization_routine. Uses the parent routine for the training runs. Implements a customized _optimization_rountine when running the Gaussian Process learner. Overrides _optimization_routine. Uses the parent routine for the training runs. Implements a customized _optimization_rountine when running the Gaussian Process learner.
''' '''
- #Run the training runs using the standard optimization routine. Adjust the number of max_runs + #Run the training runs using the standard optimization routine.
self.log.debug('Starting training optimization.') self.log.debug('Starting training optimization.')
self.log.info('Run:' + str(self.num_in_costs +1)) self.log.info('Run:' + str(self.num_in_costs +1))
next_params = self._first_params() next_params = self._first_params()
View
@@ -57,6 +57,8 @@ def _config_logger(log_filename = default_log_filename,
file_log_level (Optional[int]) : Level of log output for file, default is logging.DEBUG = 10 file_log_level (Optional[int]) : Level of log output for file, default is logging.DEBUG = 10
console_log_level (Optional[int]) :Level of log output for console, defalut is logging.INFO = 20 console_log_level (Optional[int]) :Level of log output for console, defalut is logging.INFO = 20
+ Returns:
+ dictionary: Dict with extra keywords not used by the logging configuration.
''' '''
if not os.path.exists(log_foldername): if not os.path.exists(log_foldername):
os.makedirs(log_foldername) os.makedirs(log_foldername)
View
@@ -32,7 +32,7 @@ def test_max_num_runs(self):
controller = mlc.create_controller(interface, controller = mlc.create_controller(interface,
max_num_runs = 5, max_num_runs = 5,
target_cost = -1, target_cost = -1,
- max_num_runs_without_better_params = 2) + max_num_runs_without_better_params = 10)
controller.optimize() controller.optimize()
self.assertTrue(controller.best_cost == 1.) self.assertTrue(controller.best_cost == 1.)
self.assertTrue(np.array_equiv(np.array(controller.in_costs), self.assertTrue(np.array_equiv(np.array(controller.in_costs),

0 comments on commit baa5074

Please sign in to comment.