From aaa047e24c4c3b9d62fd67ad29cddff8257da7d6 Mon Sep 17 00:00:00 2001 From: Vito Walter Anelli Date: Thu, 11 Mar 2021 15:27:43 +0100 Subject: [PATCH] default validation k cleaned --- elliot/recommender/base_recommender_model.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/elliot/recommender/base_recommender_model.py b/elliot/recommender/base_recommender_model.py index 561af128..0d86fd62 100644 --- a/elliot/recommender/base_recommender_model.py +++ b/elliot/recommender/base_recommender_model.py @@ -35,7 +35,7 @@ def __init__(self, data, config, params, *args, **kwargs): _cutoff_k = getattr(data.config.evaluation, "cutoffs", [data.config.top_k]) _cutoff_k = _cutoff_k if isinstance(_cutoff_k, list) else [_cutoff_k] _first_metric = data.config.evaluation.simple_metrics[0] if data.config.evaluation.simple_metrics else "" - _default_validation_k = getattr(data.config.evaluation, "cutoffs", [data.config.top_k])[0] + _default_validation_k = _cutoff_k[0] self._validation_metric = getattr(self._params.meta, "validation_metric", _first_metric + "@" + str(_default_validation_k)).split("@") if self._validation_metric[0].lower() not in [m.lower()