MCPcopy Create free account

hub / github.com/AkaliKong/MiniOneRec / functions

Functions426 in github.com/AkaliKong/MiniOneRec

↓ 30 callersMethodencode
(self, s: str, bos: bool, eos: bool)
data.py:20
↓ 18 callersMethod__init__
(self, train_file, tokenizer, max_len=2048, sample=-1, test = False, seed=0, category="", K=4, dedup=False)
data.py:109
↓ 13 callersFunctionclean_text
Clean text by removing HTML and excessive whitespace.
data/amazon23_data_process.py:12
↓ 13 callersMethodget_inputs
(self)
data.py:56
↓ 12 callersMethodencode
(self, s: str, bos: bool, eos: bool)
ts_rec_data.py:21
↓ 10 callersMethodgenerate_prompt
(self, data_point)
data.py:80
↓ 10 callersFunctionset_color
(log, color, highlight=True)
rq/utils.py:10
↓ 9 callersMethod_make_response
(self, content, status_code=200)
tests/test_minimax_provider.py:125
↓ 8 callersFunctionget_hash
(x)
evaluate.py:24
↓ 6 callersMethod_make_response
(self, content, status_code=200)
tests/test_minimax_provider.py:60
↓ 6 callersMethodlog
(self, logs: dict[str, float], start_time: Optional[float] = None)
minionerec_trainer.py:1083
↓ 5 callersMethodget_indices
(self, xs, use_sk=False)
rq/models/rqvae.py:69
↓ 4 callersFunctionclean_text
Clean text by removing HTML tags and excessive whitespace
data/amazon18_data_process_gpr.py:15
↓ 4 callersFunctionclean_text
Clean text by removing HTML tags and excessive whitespace
data/amazon18_data_process.py:15
↓ 4 callersMethodencoder
(self, input_tensor)
utility.py:141
↓ 4 callersFunctionsemantic_tokens_to_id
Convert semantic tokens list to concatenated string with brackets preserved
convert_dataset_gpr.py:37
↓ 4 callersFunctionsemantic_tokens_to_id
Convert semantic tokens list to concatenated string with brackets preserved
convert_dataset.py:37
↓ 4 callersFunctionwrite_json_file
Write data to JSON file
data/amazon18_data_process_gpr.py:35
↓ 3 callersMethod_get_per_token_logps
(self, model, input_ids, attention_mask, logits_to_keep)
minionerec_trainer.py:627
↓ 3 callersMethod_save_checkpoint
(self, epoch, collision_rate=1, ckpt_file=None)
rq/trainer.py:154
↓ 3 callersFunctionevaluate_games
(model, test_data, device, topk, save_logits=False, eval_type="test")
sasrec.py:278
↓ 3 callersMethodfit
(self, data)
rq/trainer.py:187
↓ 3 callersMethodforward_eval
(self, states, len_states)
sasrec.py:114
↓ 3 callersMethodget_hash
(self, x)
minionerec_trainer.py:584
↓ 3 callersFunctionget_timestamp_start
Get timestamp for the start of a given year and month
data/amazon18_data_process_gpr.py:58
↓ 3 callersFunctionget_timestamp_start
Get timestamp for the start of a given year and month
data/amazon18_data_process.py:58
↓ 3 callersMethodpre
(self, idx)
ts_rec_data.py:225
↓ 3 callersMethodpre
(self, idx)
ts_rec_data.py:365
↓ 3 callersFunctionwrite_file
(path, data)
data/amazon23_data_process.py:370
↓ 3 callersFunctionwrite_json_file
(data, file_path)
data/amazon23_data_process.py:26
↓ 3 callersFunctionwrite_json_file
Write data to JSON file
data/amazon18_data_process.py:35
↓ 2 callersMethod__init__
(self, hidden_size, item_num, state_size, gru_layers=1)
sasrec.py:87
↓ 2 callersMethod_convert_to_semantic_ids
Convert item IDs to semantic ID format using index.json
data.py:1538
↓ 2 callersMethod_convert_to_semantic_ids
Convert item IDs to semantic ID format using index.json
data.py:1721
↓ 2 callersFunctionanalyze_codes
(codes, title="", verbose=True)
rq/rqkmeans_faiss.py:206
↓ 2 callersFunctioncheck_path
(path)
data/amazon23_data_process.py:22
↓ 2 callersFunctionclean_text
(raw_text)
rq/text2emb/utils.py:302
↓ 2 callersFunctioncreate_user_features
Create user features (U-Token)
data/amazon18_data_process_gpr.py:476
↓ 2 callersFunctiondelete_file
(filename)
rq/utils.py:35
↓ 2 callersMethodgenerate_prompt
(self, data_point)
ts_rec_data.py:55
↓ 2 callersFunctionget_first_nbits
(rq)
rq/rqkmeans_faiss.py:293
↓ 2 callersMethodget_history
(self, row)
ts_rec_data.py:61
↓ 2 callersMethodget_inputs
(self)
ts_rec_data.py:126
↓ 2 callersMethodget_inputs
(self)
ts_rec_data.py:407
↓ 2 callersMethodget_inputs
(self)
ts_rec_data.py:637
↓ 2 callersFunctionget_rq_codebooks
(rq)
rq/rqkmeans_faiss.py:88
↓ 2 callersFunctionget_timestamp_start
Return epoch seconds for start of a month.
data/amazon23_data_process.py:36
↓ 2 callersFunctionget_timestamp_start
(year, month)
data/process.py:13
↓ 2 callersFunctionload_json
(file)
rq/text2emb/utils.py:297
↓ 2 callersFunctionpairwise_sq_dists_batch
X: (B,d) C: (K,d)
rq/rqkmeans_faiss.py:18
↓ 2 callersFunctionparse_sid
(sid)
rl_gpr.py:86
↓ 2 callersMethodpre
(self, idx)
ts_rec_data.py:583
↓ 2 callersFunctionset_seed
(seed)
rl.py:20
↓ 2 callersFunctionwrite_remap_index
Write index mapping to file
data/amazon18_data_process_gpr.py:41
↓ 2 callersFunctionwrite_remap_index
(index_map, file_path)
data/amazon23_data_process.py:31
↓ 2 callersFunctionwrite_remap_index
Write index mapping to file
data/amazon18_data_process.py:41
↓ 1 callersMethod__init__
(self, input_size, output_size, emb_size, clusters_k=10)
utility.py:154
↓ 1 callersMethod__init__
(self, hidden_size, num_units, num_heads, dropout_rate)
SASRecModules_ori.py:27
↓ 1 callersMethod_build_optimizer
(self)
rq/trainer.py:49
↓ 1 callersMethod_check_nan
(self, loss)
rq/trainer.py:93
↓ 1 callersMethod_generate_train_loss_output
(self, epoch_idx, s_time, e_time, loss, recon_loss)
rq/trainer.py:174
↓ 1 callersMethod_get_scheduler
(self)
rq/trainer.py:83
↓ 1 callersMethod_load_data
(self)
sft.py:38
↓ 1 callersMethod_load_data
(self)
ts_rec_sft.py:34
↓ 1 callersMethod_load_data
(self)
sft_gpr.py:38
↓ 1 callersMethod_move_model_to_vllm
(self)
minionerec_trainer.py:638
↓ 1 callersMethod_prepare_inputs
(self, inputs: dict[str, Union[torch.Tensor, Any]])
minionerec_trainer.py:665
↓ 1 callersMethod_prepare_preference_data
Prepare data directly from training samples
data.py:1511
↓ 1 callersMethod_prepare_sequence_data
Prepare sequence prediction data from training samples
data.py:1694
↓ 1 callersMethod_process_description
Process description according to the requirements: 1. If description is empty, use title 2. If description is a list, select
ts_rec_data.py:484
↓ 1 callersMethod_process_description
Process description according to the requirements: 1. If description is empty, use title 2. If description is a list, select
data.py:1181
↓ 1 callersMethod_train_epoch
(self, train_data, epoch_idx)
rq/trainer.py:98
↓ 1 callersMethod_valid_epoch
(self, valid_data)
rq/trainer.py:128
↓ 1 callersFunctionactivation_layer
(activation_name="relu", emb_dim=None)
rq/models/layers.py:45
↓ 1 callersMethodaggregate
(self, input_tensor)
utility.py:129
↓ 1 callersFunctionanalyze_codes
Analyze code distribution and collision rate
rq/rqkmeans_constrained.py:149
↓ 1 callersFunctionanalyze_duplication
(codes_df)
rq/generate_indices_plus.py:152
↓ 1 callersFunctionapply_rqkmeans_plus_strategy
(model, codebook_path, device)
rq/rqkmeans_plus.py:24
↓ 1 callersFunctionbalanced_kmeans_level_constrained
Balanced K-means implemented with k-means-constrained
rq/rqkmeans_constrained.py:26
↓ 1 callersFunctionbuild_interaction_list_amazon23
Build interaction sequences (history_len=10). Same logic as your original json2csv version but using: - user_id - rating
data/amazon23_data_process.py:265
↓ 1 callersFunctionbuild_item_features_amazon23
Convert Amazon23 metadata to amazon18-style: - title - description (list → str) - features - categories -
data/amazon23_data_process.py:390
↓ 1 callersFunctionbuild_review_data_amazon23
Build review_data: key = (uid, iid, timestamp) value = {review, title}
data/amazon23_data_process.py:457
↓ 1 callersFunctioncalcu_propensity_score
(buffer)
sasrec.py:401
↓ 1 callersFunctioncalculate_hit_games_cuda
(prediction, topk_list, target, hit_all, ndcg_all)
sasrec.py:280
↓ 1 callersMethodcenter_distance_for_constraint
(distances)
rq/models/vq.py:52
↓ 1 callersFunctioncheck_collision
(all_indices_str)
rq/generate_indices.py:18
↓ 1 callersFunctioncheck_collision
(all_indices_str)
rq/models/generate_indices.py:18
↓ 1 callersFunctioncheck_path
Create directory if it doesn't exist
data/amazon18_data_process_gpr.py:30
↓ 1 callersFunctioncheck_path
Create directory if it doesn't exist
data/amazon18_data_process.py:30
↓ 1 callersMethodcompute_loss
(self, model, inputs, return_outputs=False, num_items_in_batch=None)
minionerec_trainer.py:1035
↓ 1 callersMethodcompute_loss
(self, out, quant_loss, xs=None)
rq/models/rqvae.py:74
↓ 1 callersFunctioncompute_residuals_upto_level
(rq, data, codes, upto_level, codebooks=None)
rq/rqkmeans_faiss.py:96
↓ 1 callersFunctionconvert_interactions_amazon23
Convert interactions to amazon18-style: - user2index - item2index - user2items[user_index] = [item_index...] - interactions list
data/amazon23_data_process.py:221
↓ 1 callersFunctionconvert_interactions_to_csv
Convert interaction data to MiniOneRec CSV format using semantic IDs
convert_dataset_gpr.py:54
↓ 1 callersFunctionconvert_interactions_to_csv
Convert interaction data to MiniOneRec CSV format using semantic IDs
convert_dataset.py:54
↓ 1 callersFunctionconvert_inters2dict_amazon18_style
Convert interactions to dict format like amazon18_data_process
data/amazon18_data_process_gpr.py:180
↓ 1 callersFunctionconvert_inters2dict_amazon18_style
Convert interactions to dict format like amazon18_data_process
data/amazon18_data_process.py:180
↓ 1 callersFunctionconvert_ms_to_sec
Amazon23 sort_timestamp is in milliseconds. Convert to seconds.
data/amazon23_data_process.py:41
↓ 1 callersFunctionconvert_to_atomic_files_json2csv_style
Convert interaction list to train/valid/test files using 8:1:1 split like json2csv
data/amazon18_data_process_gpr.py:286
↓ 1 callersFunctionconvert_to_atomic_files_json2csv_style
Convert interaction list to train/valid/test files using 8:1:1 split like json2csv
data/amazon18_data_process.py:281
next →1–100 of 426, ranked by callers