MCPcopy Create free account
hub / github.com/FastMAS/KVCOMM / update

Method update

experiments/accuracy.py:8–11  ·  view source on GitHub ↗
(self, predicted: str, target: str)

Source from the content-addressed store, hash-verified

6 self._num_total = 0
7
8 def update(self, predicted: str, target: str) -> None:
9 is_correct = target in predicted
10 self._num_correct += int(is_correct)
11 self._num_total += 1
12
13 def get(self) -> float:
14 return self._num_correct / self._num_total

Callers 4

evaluateFunction · 0.95
set_anchorMethod · 0.80
__setstate__Method · 0.80
__setstate__Method · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected