boulder_opal_controller

qctrlmloop.boulder_opal_controller(interface, optimizer, test_point_count=None, learner_name=None, training_run_count=0, interleaved_run_count=0, **kwargs)

A helper function to create a BoulderOpalController object.

You can use this to create a BoulderOpalController when calling Boulder Opal from an M-LOOP configuration file. To do this, add the line controller_type="qctrlmloop:boulder_opal_controller" to the configuration file, and follow it with all the parameters that you want to pass to this function.

Parameters

  • interface (mloop.interfaces.Interface) – The M-LOOP interface from where you obtain the cost value of the test points.
  • optimizer (bo.closed_loop.ClosedLoopOptimizer) – A closed-loop optimizer from the Boulder Opal package.
  • test_point_count (int or None , optional) – The requested number of test points that the Boulder Opal automated closed-loop optimizer generates at each step. If chosen, it must be greater than zero. This is a hint only. The Boulder Opal automated closed-loop optimizer might choose differently.
  • learner_name (str or None , optional) – The name of the M-LOOP Learner that this controller uses to obtain extra test points, before there are enough results to run a step of the Boulder Opal automated closed-loop optimizer. Defaults to None, in which case this controller uses a RandomLearner.
  • training_run_count (int , optional) – The minimum number of training points that the controller obtains before calling the Boulder Opal automated closed-loop optimizer. Defaults to 0, in which case the controller uses the minimum number of points that the Boulder Opal automated closed-loop optimizer requires.
  • interleaved_run_count (int , optional) – The minimum number of test points that the controller obtains from the learner between two calls of the Boulder Opal automated closed-loop optimizer, in addition to the points that Boulder Opal requested. Defaults to 0.
  • **kwargs (dict) – All the extra arguments that the Controller class from M-LOOP accepts.

Returns

The controller that integrates Boulder Opal with M-LOOP.

Return type

BoulderOpalController

Raises

QctrlArgumentsValueError – Raised if the provided learner_name doesn’t match a valid object class.

Was this useful?