tests/functional/commands/conftest.py
def single_with_trials(single_without_success):
    """Create an experiment with all types of trials."""
    exp = experiment_builder.build(name="test_single_exp")

    x = {"name": "/x", "type": "real", "value": 100}
    results = {"name": "obj", "type": "objective", "value": 0}
    trial = Trial(experiment=exp.id, params=[x], status="completed", results=[results])
    Database().write("trials", trial.to_dict())
Create an experiment with all types of trials.
Create an experiment with all types of trials.
Create an experiment with all types of trials .
def single_with_trials(single_without_success):
    exp = experiment_builder.build(name="test_single_exp")
    x = {"name": "/x", "type": "real", "value": 100}
    results = {"name": "obj", "type": "objective", "value": 0}
    trial = Trial(experiment=exp.id, params=[x], status="completed", results=[results])
    Database().write("trials", trial.to_dict())
def single_with_trials ( single_without_success ) : exp = experiment_builder . build ( name = "test_single_exp" ) x = { "name" : "/x" , "type" : "real" , "value" : 100 } results = { "name" : "obj" , "type" : "objective" , "value" : 0 } trial = Trial ( experiment = exp . id , params = [ x ] , status = "completed" , results = [ results ] ) Database ( ) . write ( "trials" , trial . to_dict ( ) )
Create an experiment with all types of trials.
Create an experiment with all types of trials .
"""Create an experiment with all types of trials."""
single_without_success