src/orion/client/__init__.py
def workon(
    function, space, name="loop", algorithms=None, max_trials=None, max_broken=None
):
    """Optimize a function over a given search space

    This will create a new experiment with an in-memory storage and optimize the given function
    until `max_trials` is reached or the `algorithm` is done
    (some algorithms like random search are never done).

    For informations on how to fetch results, see
    :py:class:`orion.client.experiment.ExperimentClient`.

    .. note::

        Each call to this function will create a separate in-memory storage.

    Parameters
    ----------
    name: str
        Name of the experiment
    version: int, optional
        Version of the experiment. Defaults to last existing version for a given `name`
        or 1 for new experiment.
    space: dict, optional
        Optimization space of the algorithm. Should have the form `dict(name='<prior>(args)')`.
    algorithms: str or dict, optional
        Algorithm used for optimization.
    max_trials: int, optional
        Maximum number or trials before the experiment is considered done.
    max_broken: int, optional
        Number of broken trials for the experiment to be considered broken.

    Raises
    ------
    `NotImplementedError`
        If the algorithm specified is not properly installed.

    """
    # Clear singletons and keep pointers to restore them.
    singletons = update_singletons()

    try:
        setup_storage(storage={"type": "legacy", "database": {"type": "EphemeralDB"}})

        experiment = experiment_builder.build(
            name,
            version=1,
            space=space,
            algorithms=algorithms,
            strategy="NoParallelStrategy",
            max_trials=max_trials,
            max_broken=max_broken,
        )

        producer = Producer(experiment)

        experiment_client = ExperimentClient(experiment, producer)
        experiment_client.workon(function, max_trials=max_trials)
    finally:
        # Restore singletons
        update_singletons(singletons)

    return experiment_client
Optimize a function over a given search space

    This will create a new experiment with an in-memory storage and optimize the given function
    until `max_trials` is reached or the `algorithm` is done
    (some algorithms like random search are never done).

    For informations on how to fetch results, see
    :py:class:`orion.client.experiment.ExperimentClient`.

    .. note::

        Each call to this function will create a separate in-memory storage.

    Parameters
    ----------
    name: str
        Name of the experiment
    version: int, optional
        Version of the experiment. Defaults to last existing version for a given `name`
        or 1 for new experiment.
    space: dict, optional
        Optimization space of the algorithm. Should have the form `dict(name='<prior>(args)')`.
    algorithms: str or dict, optional
        Algorithm used for optimization.
    max_trials: int, optional
        Maximum number or trials before the experiment is considered done.
    max_broken: int, optional
        Number of broken trials for the experiment to be considered broken.

    Raises
    ------
    `NotImplementedError`
        If the algorithm specified is not properly installed.

    
Optimize a function over a given search space
This will create a new experiment with an in-memory storage and optimize the given function
until `max_trials` is reached or the `algorithm` is done
(some algorithms like random search are never done).

For informations on how to fetch results, see
Optimize a function over a given search space This will create a new experiment with an in - memory storage and optimize the given function until ` max_trials ` is reached or the ` algorithm ` is done ( some algorithms like random search are never done ) . For informations on how to fetch results see
def workon(
    function, space, name="loop", algorithms=None, max_trials=None, max_broken=None
):
    singletons = update_singletons()
    try:
        setup_storage(storage={"type": "legacy", "database": {"type": "EphemeralDB"}})
        experiment = experiment_builder.build(
            name,
            version=1,
            space=space,
            algorithms=algorithms,
            strategy="NoParallelStrategy",
            max_trials=max_trials,
            max_broken=max_broken,
        )
        producer = Producer(experiment)
        experiment_client = ExperimentClient(experiment, producer)
        experiment_client.workon(function, max_trials=max_trials)
    finally:
        update_singletons(singletons)
    return experiment_client
def workon ( function , space , name = "loop" , algorithms = None , max_trials = None , max_broken = None ) : singletons = update_singletons ( ) try : setup_storage ( storage = { "type" : "legacy" , "database" : { "type" : "EphemeralDB" } } ) experiment = experiment_builder . build ( name , version = 1 , space = space , algorithms = algorithms , strategy = "NoParallelStrategy" , max_trials = max_trials , max_broken = max_broken , ) producer = Producer ( experiment ) experiment_client = ExperimentClient ( experiment , producer ) experiment_client . workon ( function , max_trials = max_trials ) finally : update_singletons ( singletons ) return experiment_client
Optimize a function over a given search space
This will create a new experiment with an in-memory storage and optimize the given function
until `max_trials` is reached or the `algorithm` is done
(some algorithms like random search are never done).
Optimize a function over a given search space This will create a new experiment with an in - memory storage and optimize the given function until ` max_trials ` is reached or the ` algorithm ` is done ( some algorithms like random search are never done ) .
"""Optimize a function over a given search space

    This will create a new experiment with an in-memory storage and optimize the given function
    until `max_trials` is reached or the `algorithm` is done
    (some algorithms like random search are never done).

    For informations on how to fetch results, see
    :py:class:`orion.client.experiment.ExperimentClient`.

    .. note::

        Each call to this function will create a separate in-memory storage.

    Parameters
    ----------
    name: str
        Name of the experiment
    version: int, optional
        Version of the experiment. Defaults to last existing version for a given `name`
        or 1 for new experiment.
    space: dict, optional
        Optimization space of the algorithm. Should have the form `dict(name='<prior>(args)')`.
    algorithms: str or dict, optional
        Algorithm used for optimization.
    max_trials: int, optional
        Maximum number or trials before the experiment is considered done.
    max_broken: int, optional
        Number of broken trials for the experiment to be considered broken.

    Raises
    ------
    `NotImplementedError`
        If the algorithm specified is not properly installed.

    """ # Clear singletons and keep pointers to restore them. # Restore singletons
function
space
name
algorithms
max_trials
max_broken
py
`orion.client.experiment.ExperimentClient`.
note:.

Each call to this function will create a separate in-memory storage.

Parameters

str
Name of the experiment
version: int, optional
Version of the experiment. Defaults to last existing version for a given `name`
or 1 for new experiment.
space: dict, optional
Optimization space of the algorithm. Should have the form `dict(name='(args)')`.
algorithms: str or dict, optional
Algorithm used for optimization.
max_trials: int, optional
Maximum number or trials before the experiment is considered done.
max_broken: int, optional
Number of broken trials for the experiment to be considered broken.

Raises

`NotImplementedError`
If the algorithm specified is not properly installed.
` orion . client . experiment . ExperimentClient ` . note : . Each call to this function will create a separate in - memory storage . Parameters str Name of the experiment version : int optional Version of the experiment . Defaults to last existing version for a given ` name ` or 1 for new experiment . space : dict optional Optimization space of the algorithm . Should have the form ` dict ( name = ' ( args ) ' ) ` . algorithms : str or dict optional Algorithm used for optimization . max_trials : int optional Maximum number or trials before the experiment is considered done . max_broken : int optional Number of broken trials for the experiment to be considered broken . Raises ` NotImplementedError ` If the algorithm specified is not properly installed .