MCPcopy
hub / github.com/policy-gradient/GRPO-Zero / __getitem__

Method __getitem__

countdown_task.py:44–47  ·  view source on GitHub ↗
(self, idx)

Source from the content-addressed store, hash-verified

42 return len(self.data)
43
44 def __getitem__(self, idx):
45 item = self.data.iloc[idx].to_dict()
46 item.update(self.encode_prefix(item["nums"], item["target"]))
47 return item
48
49 def encode_prefix(self, numbers: List[int], target: int):
50 """Prefix is the *actual* input to the model."""

Callers

nothing calls this directly

Calls 1

encode_prefixMethod · 0.95

Tested by

no test coverage detected