diff --git a/tests/test_backend_nn_ensemble.py b/tests/test_backend_nn_ensemble.py index 73dbf4558..a6345f534 100644 --- a/tests/test_backend_nn_ensemble.py +++ b/tests/test_backend_nn_ensemble.py @@ -170,6 +170,17 @@ def test_nn_ensemble_is_trained(app_project): assert nn_ensemble.is_trained +def test_nn_ensemble_hyperopt(app_project, fulltext_corpus): + nn_ensemble_type = annif.backend.get_backend('nn_ensemble') + nn_ensemble = nn_ensemble_type( + backend_id='nn_ensemble', + config_params={'sources': 'dummy-en'}, + project=app_project) + + optimizer = nn_ensemble.get_hp_optimizer(fulltext_corpus, metric='NDCG') + optimizer.optimize(n_trials=2, n_jobs=1, results_file=None) + + def test_nn_ensemble_modification_time(app_project): nn_ensemble_type = annif.backend.get_backend("nn_ensemble") nn_ensemble = nn_ensemble_type(