From 535d48ba71951170f8a8253d70af53a306f6ce41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Catarina=20Bel=C3=A9m?= Date: Sun, 4 Jun 2023 09:28:47 -0700 Subject: [PATCH] Update reader.py --- hw3/code/reader.py | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/hw3/code/reader.py b/hw3/code/reader.py index af85320c..767ca23f 100644 --- a/hw3/code/reader.py +++ b/hw3/code/reader.py @@ -44,22 +44,7 @@ def _select_answer( return candidate_answers[0].text elif self.mode == "confidence": - # --------------------------------------------------------------------- - # TODO - Implement confidence-based answer selection - # --------------------------------------------------------------------- - # To do this, you will be provided a list of candidate answers in the - # same order as the relevant documents for a given query. The Answers - # are data.Answer objects, constituting a text and a score. - # - # You should return the text of the candidate answer whose score is - # the largest. - # --------------------------------------------------------------------- - raise NotImplementedError(f"To be updated by the student: {self.mode}") - # --------------------------------------------------------------------- - # Don't change anything below this point (: You've done enough! - # Keep up with the good work buddy! - # --------------------------------------------------------------------- - return cand + raise NotImplementedError(f"Not currently supported") elif self.mode == "debug": return [cand for cand in candidate_answers] else: @@ -267,4 +252,4 @@ def __init__(self, **kwargs): def _find_candidates( self, query: str, documents: Union[str, List[str]] ) -> List[Answer]: - pass \ No newline at end of file + pass