tests/functional/commands/conftest.py
def family_with_trials(two_experiments):
    """Create two related experiments with all types of trials."""
    exp = experiment_builder.build(name="test_double_exp")
    exp2 = experiment_builder.build(name="test_double_exp_child")
    x = {"name": "/x", "type": "real"}
    y = {"name": "/y", "type": "real"}

    x_value = 0
    for status in Trial.allowed_stati:
        x["value"] = x_value
        y["value"] = x_value
        trial = Trial(experiment=exp.id, params=[x], status=status)
        x["value"] = x_value
        trial2 = Trial(experiment=exp2.id, params=[x, y], status=status)
        x_value += 1
        Database().write("trials", trial.to_dict())
        Database().write("trials", trial2.to_dict())
Create two related experiments with all types of trials.
Create two related experiments with all types of trials.
Create two related experiments with all types of trials .
def family_with_trials(two_experiments):
    exp = experiment_builder.build(name="test_double_exp")
    exp2 = experiment_builder.build(name="test_double_exp_child")
    x = {"name": "/x", "type": "real"}
    y = {"name": "/y", "type": "real"}
    x_value = 0
    for status in Trial.allowed_stati:
        x["value"] = x_value
        y["value"] = x_value
        trial = Trial(experiment=exp.id, params=[x], status=status)
        x["value"] = x_value
        trial2 = Trial(experiment=exp2.id, params=[x, y], status=status)
        x_value += 1
        Database().write("trials", trial.to_dict())
        Database().write("trials", trial2.to_dict())
def family_with_trials ( two_experiments ) : exp = experiment_builder . build ( name = "test_double_exp" ) exp2 = experiment_builder . build ( name = "test_double_exp_child" ) x = { "name" : "/x" , "type" : "real" } y = { "name" : "/y" , "type" : "real" } x_value = 0 for status in Trial . allowed_stati : x [ "value" ] = x_value y [ "value" ] = x_value trial = Trial ( experiment = exp . id , params = [ x ] , status = status ) x [ "value" ] = x_value trial2 = Trial ( experiment = exp2 . id , params = [ x , y ] , status = status ) x_value += 1 Database ( ) . write ( "trials" , trial . to_dict ( ) ) Database ( ) . write ( "trials" , trial2 . to_dict ( ) )
Create two related experiments with all types of trials.
Create two related experiments with all types of trials .
"""Create two related experiments with all types of trials."""
two_experiments