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

Method __init__

data.py:203–221  ·  view source on GitHub ↗
(self, train_file, max_len=2048, sample=-1, seed=0, category="", dedup=False)

Source from the content-addressed store, hash-verified

201
202class D3Dataset(CSVBaseDataset):
203 def __init__(self, train_file, max_len=2048, sample=-1, seed=0, category="", dedup=False):
204 super().__init__(train_file, sample, seed, max_len, category, dedup, tokenizer=None, test=False)
205
206 self.prompt2history = {}
207 self.history2target = {}
208 self.instructs = [
209 f"Given a list of {category} the user recetenly enjoy, please write a new {category} that the user may bought",
210 f"Considering the {category} that has recently captured the user's interest, kindly create a compilation of other {category} that the user might have played prior to this.",
211 f"Based on the user's current gaming preference, please draft a list of potential {category} they may have experienced beforehand.",
212 f"Reflecting on the {category} the user has taken pleasure in recently, we request that you formulate a list of {category} that may have preceded the user's current enjoyment.",
213 f"In light of the recent gaming enjoyment expressed by the user, please assemble a list of {category} that could potentially include past titles the user has engaged with.",
214 f"Taking into account the {category} that has lately provided enjoyment to the user, please put together an inventory of {category} the user might have explored previously.",
215 f"Given the user's newfound enjoyment of a particular {category}, would you kindly generate a roster of other {category} that might resonate with their past gaming experiences?",
216 f"In response to the user's recent fondness for a specific {category}, we seek your assistance in listing possible {category} the user may have delighted in earlier.",
217 f"With respect to the {category} currently enjoyed by the user, please compile a suggestive list of {category} they may have played in the past.",
218 f"Bearing in mind the {category} that the user has recently been enthralled by, please construct a catalog of other {category} that the user potentially partook in beforehand.",
219 f"In relation to the user's recent entertainment with a given {category}, it would be appreciated if you could curate a list of {category} that might form part of the user's previous gaming history."
220 ]
221 self.get_inputs()
222
223 def get_history(self, row):
224 row['history_item_title'] = eval(row['history_item_title'])

Callers

nothing calls this directly

Calls 2

__init__Method · 0.45
get_inputsMethod · 0.45

Tested by

no test coverage detected