MCPcopy Create free account

hub / github.com/AkaliKong/MiniOneRec / functions

Functions426 in github.com/AkaliKong/MiniOneRec

↓ 1 callersFunctionprocess_dataset_recursive
Process dataset with recursive year reduction like json2csv
data/amazon18_data_process.py:434
↓ 1 callersFunctionresidual_kmeans_constrained
Residual K-means with constrained balanced clustering Args: X: Input data (N, d) K: Number of clusters per level (int or lis
rq/rqkmeans_constrained.py:67
↓ 1 callersFunctionsave_indices_json
(codes, path, use_prefix=True)
rq/rqkmeans_faiss.py:220
↓ 1 callersFunctionset_seed
(seed)
rl_gpr.py:21
↓ 1 callersFunctionset_seed
(seed)
sft.py:58
↓ 1 callersFunctionset_seed
(seed)
ts_rec_sft.py:53
↓ 1 callersFunctionset_seed
(seed)
sft_gpr.py:58
↓ 1 callersFunctionset_seed
(seed)
evaluate.py:28
↓ 1 callersFunctionsetup_seed
(seed)
sasrec.py:76
↓ 1 callersFunctionsinkhorn_algorithm
(distances, epsilon, sinkhorn_iterations)
rq/models/layers.py:86
↓ 1 callersFunctionsinkhorn_balance_level
(residuals, centroids, capacities=None, *, batch_size=8192, iters=30, tau=None,
rq/rqkmeans_faiss.py:118
↓ 1 callersFunctionsinkhorn_uniform_mapping
(rq, data, codes, *, batch_size=8192, iters=30, tau=None, verbose=True,
rq/rqkmeans_faiss.py:180
↓ 1 callersFunctiontrain_faiss_rq
(data, num_levels=3, codebook_size=256, verbose=True)
rq/rqkmeans_faiss.py:29
↓ 1 callersFunctionunpack_rq_codes
Unpack FAISS's bit-packed codes into integer index arrays Parameters: codes: (N, M_bytes) uint8 array, from rq.compute_codes nbits:
rq/rqkmeans_faiss.py:46
↓ 1 callersFunctionwrite_atomic_files
(args, interaction_list, user2index)
data/amazon23_data_process.py:354
↓ 1 callersMethodz_encode
(self, input_tensor)
utility.py:132
Method__call__
(self, input_ids: torch.LongTensor, scores: torch.FloatTensor)
LogitProcessor.py:45
Method__getitem__
(self, idx)
ts_rec_data.py:142
Method__getitem__
(self, idx)
ts_rec_data.py:276
Method__getitem__
(self, idx)
ts_rec_data.py:416
Method__getitem__
(self, idx)
ts_rec_data.py:648
Method__getitem__
(self, i)
sasrec.py:418
Method__getitem__
(self, idx)
data.py:71
Method__getitem__
(self, index)
rq/datasets.py:33
Method__init__
(self, input_size=64, hidden_size=64, output_size=64, dropout_prob=0.4, device=None)
utility.py:105
Method__init__
(self)
data_test.py:16
Method__init__
(self, data_path, dataset, index_file=".index.json")
sft.py:31
Method__init__
(self, tokenizer)
ts_rec_data.py:15
Method__init__
(self, train_file, tokenizer, max_len=2048, sample=-1, test=False, seed=0, category="", K=4, dedup=False)
ts_rec_data.py:39
Method__init__
Dataset for token2description and description2token tasks. Args: description_file: Path to .index.json file with
ts_rec_data.py:148
Method__init__
Dataset for sid2title and title2sid tasks. Args: item_file: Path to .item.json file with item features
ts_rec_data.py:284
Method__init__
Fusion dataset combining sequence recommendation with item features. Uses semantic IDs for user history, outputs item titles or descr
ts_rec_data.py:424
Method__init__
( self, prefix_allowed_tokens_fn: Callable[[int, torch.Tensor], List[int]], num_beams:
LogitProcessor.py:26
Method__init__
(self, d_in, d_hid, dropout=0.1)
SASRecModules_ori.py:8
Method__init__
(self, data_path, dataset, index_file=".index.json")
ts_rec_sft.py:27
Method__init__
(self, data_path, dataset, index_file=".index.json")
sft_gpr.py:31
Method__init__
(self, data_source: Sized, repeat_count: int, seed: Optional[int] = None)
minionerec_trainer.py:100
Method__init__
( self, model: Union[str, PreTrainedModel], base_model: str, reward_funcs: Uni
minionerec_trainer.py:211
Method__init__
(self, hidden_size, item_num, state_size, num_filters, filter_sizes, dropout_rate)
sasrec.py:128
Method__init__
(self, hidden_size, item_num, state_size, dropout, device, num_heads=1)
sasrec.py:215
Method__init__
(self, data_df)
sasrec.py:415
Method__init__
(self, tokenizer)
data.py:14
Method__init__
(self, tokenizer=None, max_len=2048, test=False, category="", dedup=False, seed=None)
data.py:38
Method__init__
(self, train_file, sample=-1, seed=0, max_len=2048, category="", dedup=False, tokenizer=None, test=False)
data.py:88
Method__init__
(self, item_file=None, index_file=None, tokenizer=None, max_len=2048, test=False, category="", dedup=False, se
data.py:98
Method__init__
(self, train_file, max_len=2048, sample=-1, seed=0, category="", dedup=False)
data.py:203
Method__init__
(self, train_file, tokenizer, max_len=2048, sample=-1, test = False, seed=0, category="", K=4, dedup=False)
data.py:264
Method__init__
(self, train_file, max_len=2048, sample=-1, seed=0, category="", dedup=False)
data.py:355
Method__init__
(self, train_file, tokenizer, max_len=2048, sample=-1, test=False, seed=0, category="", K=4, dedup=False)
data.py:398
Method__init__
(self, train_file, tokenizer, max_len=2048, sample=-1, test=False, seed=0, category="", K=4, dedup=False)
data.py:470
Method__init__
(self, train_file, tokenizer, max_len=2048, sample=-1, test = False, seed=0, category="", K=4, dedup=False)
data.py:599
Method__init__
Dataset for sid2title and title2sid tasks. Args: item_file: Path to .item.json file with item features
data.py:679
Method__init__
RL-specific dataset for title2sid and description2sid tasks. Returns prompt-completion pairs for RL training. Args:
data.py:790
Method__init__
RL-specific dataset for sequential recommendation using title sequences. Uses user interaction history with item titles to recommend
data.py:891
Method__init__
RL-specific dataset for sid2title tasks. Returns prompt-completion pairs for RL training where input is semantic ID and output is ite
data.py:970
Method__init__
RL-specific dataset for sequential recommendation using semantic IDs in history and outputting item titles. Uses user interaction his
data.py:1040
Method__init__
Fusion dataset combining sequence recommendation with item features. Uses semantic IDs for user history, outputs item titles or descr
data.py:1127
Method__init__
SFT dataset that uses item titles in user history to predict next item's semantic ID. Args: train_file: Path to
data.py:1333
Method__init__
SFT dataset that uses user interaction history and preferences from preference file. Args: user_preference_file:
data.py:1449
Method__init__
SFT dataset that uses user interaction history with preferences to predict next item's semantic ID. Uses interaction history from pre
data.py:1630
Method__init__
(self, data_path)
rq/datasets.py:8
Method__init__
(self, original_encoder)
rq/generate_indices_plus.py:16
Method__init__
(self, args, model, data_num)
rq/trainer.py:16
Method__init__
(self, original_encoder)
rq/rqkmeans_plus.py:17
Method__init__
(self, n_e, e_dim, beta = 0.25, kmeans_init = False, kmeans_iters = 10, sk_e
rq/models/vq.py:9
Method__init__
(self, n_e_list, e_dim, sk_epsilons, beta = 0.25, kmeans_init = False, kmeans_iters = 100, sk
rq/models/rq.py:13
Method__init__
( self, layers, dropout=0.0, activation="relu", bn=False )
rq/models/layers.py:9
Method__init__
(self, in_dim=768, # num_emb_list=[256,256,256,256], num_em
rq/models/rqvae.py:11
Method__iter__
(self)
minionerec_trainer.py:109
Method__len__
(self)
ts_rec_data.py:52
Method__len__
(self)
ts_rec_data.py:207
Method__len__
(self)
ts_rec_data.py:349
Method__len__
(self)
ts_rec_data.py:532
Method__len__
(self)
minionerec_trainer.py:117
Method__len__
(self)
sasrec.py:425
Method__len__
(self)
data.py:53
Method__len__
(self)
rq/datasets.py:38
Function_get_cosine_schedule_with_warmup_lr_lambda
( current_step, *, num_warmup_steps, num_training_steps, num_cycles )
sft.py:68
Function_get_cosine_schedule_with_warmup_lr_lambda
( current_step, *, num_warmup_steps, num_training_steps, num_cycles )
ts_rec_sft.py:63
Function_get_cosine_schedule_with_warmup_lr_lambda
( current_step, *, num_warmup_steps, num_training_steps, num_cycles )
sft_gpr.py:68
Method_get_eval_sampler
(self, eval_dataset)
minionerec_trainer.py:619
Method_get_train_sampler
(self, train_dataset=None)
minionerec_trainer.py:610
Method_set_signature_columns_if_needed
(self)
minionerec_trainer.py:594
Function_single_deepseek_request
(model_name, prompt, max_tokens, api_info, base_url, request_id)
rq/text2emb/utils.py:111
Function_single_minimax_request
(model_name, prompt, max_tokens, api_info, base_url, request_id)
rq/text2emb/utils.py:207
Functioncalculate_hit
(sorted_list,topk,true_items,rewards,r_click,total_reward,hit_click,ndcg_click,hit_purchase,ndcg_purchase)
utility.py:75
Functioncf_reward
(prompts, completions)
rl_gpr.py:254
Functioncf_reward
(prompts, completions)
rl.py:215
Functioncheck_path
(path)
rq/text2emb/utils.py:276
Methodcompute_loss
(self, model, inputs, return_outputs=False, num_items_in_batch=None)
sft_gpr.py:91
Methodcreate_model_card
Creates a draft of a model card using the information available to the `Trainer`. Args: model_name (`str` or `None`, *op
minionerec_trainer.py:1098
Methoddata_collator
(features)
minionerec_trainer.py:343
Methoddecode
(self, t: List[int])
ts_rec_data.py:35
Methoddecode
(self, t: List[int])
data.py:34
Methodencode
(self, text, bos=False, eos=False)
data_test.py:21
Functionextract_axis_1
(data, indices)
utility.py:10
Methodforward
(self, input_tensor)
utility.py:147
Methodforward
bias_emb: [batch_size, 1, emb_size]
utility.py:163
Methodforward
(self, x)
SASRecModules_ori.py:15
Methodforward
:param queries: A 3d tensor with shape of [N, T_q, C_q] :param keys: A 3d tensor with shape of [N, T_k, C_k] :return
SASRecModules_ori.py:40
← previousnext →201–300 of 426, ranked by callers