MCPcopy Create free account
hub / github.com/AkaliKong/MiniOneRec / pre

Method pre

data.py:381–394  ·  view source on GitHub ↗
(self, idx)

Source from the content-addressed store, hash-verified

379 "dedup": target_item_sid == last_history_item_sid}
380
381 def pre(self, idx):
382 history = self.get_history(self.data.iloc[idx])
383 target_item = history['output']
384 history['output'] = ''
385
386 prompt = self.generate_prompt(history)
387 self.prompt2history[prompt] = history["history_str"]
388 self.history2target[history["history_str"]] = target_item
389
390 return {
391 "prompt": prompt,
392 "completion": target_item,
393
394 }
395
396
397class SidSFTDataset(CSVBaseDataset):

Callers

nothing calls this directly

Calls 2

get_historyMethod · 0.95
generate_promptMethod · 0.45

Tested by

no test coverage detected