MCPcopy Create free account
hub / github.com/BeastyZ/ConvSearch-R1 / load_gold

Function load_gold

src/retrieval/server.py:116–127  ·  view source on GitHub ↗
(trec_path: str)

Source from the content-addressed store, hash-verified

114 return passage_embedding2id
115
116def load_gold(trec_path: str):
117 qid2goldid = {}
118 with open(trec_path, 'r') as f:
119 for line in f:
120 line = line.split()
121 qid = line[0]
122 goldid = line[2]
123 if qid in qid2goldid:
124 qid2goldid[qid].append(goldid)
125 else:
126 qid2goldid[qid] = [goldid]
127 return qid2goldid
128
129class QueryRequest(BaseModel):
130 queries: List[str]

Callers 2

__init__Method · 0.85
__init__Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected