Beispiel #1
0
    def test_algorithm_change_backward(self, trials):
        """Test :meth:`orion.core.evc.adapters.AlgorithmChange.backward`"""
        algorithm_change_adaptor = AlgorithmChange()

        adapted_trials = algorithm_change_adaptor.backward(trials)

        assert len(adapted_trials) == len(trials)

        assert adapted_trials[0] is trials[0]
        assert adapted_trials[-1] is trials[-1]
Beispiel #2
0
def test_algorithm_change_configuration():
    """Test :meth:`orion.core.evc.adapters.AlgorithmChange.configuration`"""
    algorithm_change_adaptor = AlgorithmChange()

    configuration = algorithm_change_adaptor.configuration[0]

    assert configuration["of_type"] == "algorithmchange"

    assert (BaseAdapter.build(
        [configuration]).adapters[0].configuration[0] == configuration)
Beispiel #3
0
 def test_algorithm_change_init(self):
     """Test initialization of :class:`orion.core.evc.adapters.AlgorithmChange`"""
     AlgorithmChange()