Skip to content

Commit

Permalink
default validation k cleaned
Browse files Browse the repository at this point in the history
  • Loading branch information
vitowalteranelli committed Mar 11, 2021
1 parent dc31120 commit aaa047e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion elliot/recommender/base_recommender_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit aaa047e

Please sign in to comment.