Exemplo n.º 1
0
def test__get_pipeline_hyperparameter_does_not_exist():
    hyperparameters = None
    pipeline = "pipeline1"

    expected_return = None
    returned = benchmark._get_pipeline_hyperparameter(hyperparameters, None, pipeline)
    assert returned == expected_return
Exemplo n.º 2
0
def test__get_pipeline_hyperparameter():
    hyperparameters = {
        "pipeline1": "pipeline1.json",
        "pipeline2": "pipeline2.json",
    }
    pipeline = "pipeline1"

    expected_return = "pipeline1.json"
    returned = benchmark._get_pipeline_hyperparameter(hyperparameters, None, pipeline)
    assert returned == expected_return
Exemplo n.º 3
0
def test__get_pipeline_hyperparameter_dataset():
    hyperparameters = {
        "dataset1": {
            "pipeline1": "pipeline1.json",
            "pipeline2": "pipeline2.json",
        }
    }
    dataset = "dataset1"

    expected_return = {
        "pipeline1": "pipeline1.json",
        "pipeline2": "pipeline2.json",
    }
    returned = benchmark._get_pipeline_hyperparameter(hyperparameters, dataset, None)
    assert returned == expected_return