<commit_before>__author__ = '<NAME>'

from apsis.models.experiment import Experiment
from abc import ABCMeta, abstractmethod


class Optimizer(object):
    """
    This defines a basic optimizer interface.
    """
    __metaclass__ = ABCMeta

    @abstractmethod
    def get_next_candidates(self, experiment):
        """
        Returns several Candidate objects given an experiment.

        It is the free choice of the optimizer how many Candidates to provide,
        but it will provide at least one.
        Parameters
        ----------
        experiment: Experiment
            The experiment to form the base of the next candidate.

        Returns
        -------
        next_candidate: list of Candidate
            The Candidate to next evaluate.
        """
        pass<commit_msg>Added init abstract function.<commit_after>__author__ = '<NAME>'

from apsis.models.experiment import Experiment
from abc import ABCMeta, abstractmethod


class Optimizer(object):
    """
    This defines a basic optimizer interface.
    """
    __metaclass__ = ABCMeta

    @abstractmethod
    def __init__(self, optimizer_params):
        """
        Initializes the optimizer with the arguments under optimizer_params.

        Parameters
        ----------
        optimizer_arguments: dict
            The parameters for the optimization. Depending on the optimizer,
            different arguments are needed.
        """
        pass

    @abstractmethod
    def get_next_candidates(self, experiment):
        """
        Returns several Candidate objects given an experiment.

        It is the free choice of the optimizer how many Candidates to provide,
        but it will provide at least one.
        Parameters
        ----------
        experiment: Experiment
            The experiment to form the base of the next candidate.

        Returns
        -------
        next_candidate: list of Candidate
            The Candidate to next evaluate.
        """
        pass
{'fraction_non_alphanumeric': 0.07110438729198185, 'fraction_numerical': 0.0, 'mean_word_length': 2.0336391437308867, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3498704', 'n_tokens_mistral': 471, 'n_tokens_neox': 459, 'n_words': 183}