Skip to content

Difficulty specifying k for HitsAtK metric in an evaluator #1382

Closed Answered by mberr
MSBradshaw asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @MSBradshaw ,

I think the issue lies in

evaluator = evaluator_resolver.make(RankBasedEvaluator(metrics=HitsAtK(k=50)), clear_on_finalize=False)

Since the first argument is already an instance of an evaluator, it will just pass it through. So either directly instantiate without the resolver

evaluator = RankBasedEvaluator(metrics=HitsAtK(k=50), clear_on_finalize=False)

or pass a combination of class/name of class + parameters to the resolver

evaluator = evaluator_resolver.make(RankBasedEvaluator, metrics=HitsAtK(k=50), clear_on_finalize=False)

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@mberr
Comment options

@MSBradshaw
Comment options

Answer selected by MSBradshaw
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants