a0c596d6ec16a9f01d906ad98bafaf7e62ef9311,tests/importance_tests/test_init.py,,test_get_param_importances_with_params,#Any#Any#Any#,105

Before Change


            value += x4
        return value

    study = create_study(storage_init_func())
    study.optimize(objective, n_trials=10)

    param_importance = get_param_importances(study, evaluator=evaluator_init_func(), params=params)

    assert isinstance(param_importance, OrderedDict)
    assert len(param_importance) == len(params)
    assert all(param in param_importance for param in params)
    for param_name, importance in param_importance.items():
        assert isinstance(param_name, str)
        assert isinstance(importance, float)
    if len(param_importance) > 0:
        assert math.isclose(1.0, sum(i for i in param_importance.values()), abs_tol=1e-5)

After Change


            value += x4
        return value

    with StorageSupplier(storage_mode) as storage:
        study = create_study(storage=storage)
        study.optimize(objective, n_trials=10)

        param_importance = get_param_importances(
            study, evaluator=evaluator_init_func(), params=params
        )

        assert isinstance(param_importance, OrderedDict)
        assert len(param_importance) == len(params)
        assert all(param in param_importance for param in params)
        for param_name, importance in param_importance.items():
            assert isinstance(param_name, str)
            assert isinstance(importance, float)
        if len(param_importance) > 0:
            assert math.isclose(1.0, sum(i for i in param_importance.values()), abs_tol=1e-5)


@parametrize_evaluator
@pytest.mark.parametrize("storage_mode", STORAGE_MODES)
def test_get_param_importances_with_target(
    storage_mode: str,
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 9

Instances


Project Name: pfnet/optuna
Commit Name: a0c596d6ec16a9f01d906ad98bafaf7e62ef9311
Time: 2021-02-27
Author: k_nzw@klis.tsukuba.ac.jp
File Name: tests/importance_tests/test_init.py
Class Name:
Method Name: test_get_param_importances_with_params


Project Name: pfnet/optuna
Commit Name: 7321c01f83abed5caec2a9deeb59715a13e94820
Time: 2021-01-21
Author: gohome.x105.gn@gmail.com
File Name: tests/storages_tests/rdb_tests/test_storage.py
Class Name:
Method Name: test_fail_stale_trials


Project Name: pfnet/optuna
Commit Name: 7321c01f83abed5caec2a9deeb59715a13e94820
Time: 2021-01-21
Author: gohome.x105.gn@gmail.com
File Name: tests/storages_tests/rdb_tests/test_storage.py
Class Name:
Method Name: test_record_heartbeat


Project Name: pfnet/optuna
Commit Name: a0c596d6ec16a9f01d906ad98bafaf7e62ef9311
Time: 2021-02-27
Author: k_nzw@klis.tsukuba.ac.jp
File Name: tests/importance_tests/test_init.py
Class Name:
Method Name: test_get_param_importances_with_target