Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/AkaliKong/MiniOneRec
/ functions
Functions
426 in github.com/AkaliKong/MiniOneRec
⨍
Functions
426
◇
Types & classes
56
↳
Endpoints
24
↓ 30 callers
Method
encode
(self, s: str, bos: bool, eos: bool)
data.py:20
↓ 18 callers
Method
__init__
(self, train_file, tokenizer, max_len=2048, sample=-1, test = False, seed=0, category="", K=4, dedup=False)
data.py:109
↓ 13 callers
Function
clean_text
Clean text by removing HTML and excessive whitespace.
data/amazon23_data_process.py:12
↓ 13 callers
Method
get_inputs
(self)
data.py:56
↓ 12 callers
Method
encode
(self, s: str, bos: bool, eos: bool)
ts_rec_data.py:21
↓ 10 callers
Method
generate_prompt
(self, data_point)
data.py:80
↓ 10 callers
Function
set_color
(log, color, highlight=True)
rq/utils.py:10
↓ 9 callers
Method
_make_response
(self, content, status_code=200)
tests/test_minimax_provider.py:125
↓ 8 callers
Function
get_hash
(x)
evaluate.py:24
↓ 6 callers
Method
_make_response
(self, content, status_code=200)
tests/test_minimax_provider.py:60
↓ 6 callers
Method
log
(self, logs: dict[str, float], start_time: Optional[float] = None)
minionerec_trainer.py:1083
↓ 5 callers
Method
get_indices
(self, xs, use_sk=False)
rq/models/rqvae.py:69
↓ 4 callers
Function
clean_text
Clean text by removing HTML tags and excessive whitespace
data/amazon18_data_process_gpr.py:15
↓ 4 callers
Function
clean_text
Clean text by removing HTML tags and excessive whitespace
data/amazon18_data_process.py:15
↓ 4 callers
Method
encoder
(self, input_tensor)
utility.py:141
↓ 4 callers
Function
semantic_tokens_to_id
Convert semantic tokens list to concatenated string with brackets preserved
convert_dataset_gpr.py:37
↓ 4 callers
Function
semantic_tokens_to_id
Convert semantic tokens list to concatenated string with brackets preserved
convert_dataset.py:37
↓ 4 callers
Function
write_json_file
Write data to JSON file
data/amazon18_data_process_gpr.py:35
↓ 3 callers
Method
_get_per_token_logps
(self, model, input_ids, attention_mask, logits_to_keep)
minionerec_trainer.py:627
↓ 3 callers
Method
_save_checkpoint
(self, epoch, collision_rate=1, ckpt_file=None)
rq/trainer.py:154
↓ 3 callers
Function
evaluate_games
(model, test_data, device, topk, save_logits=False, eval_type="test")
sasrec.py:278
↓ 3 callers
Method
fit
(self, data)
rq/trainer.py:187
↓ 3 callers
Method
forward_eval
(self, states, len_states)
sasrec.py:114
↓ 3 callers
Method
get_hash
(self, x)
minionerec_trainer.py:584
↓ 3 callers
Function
get_timestamp_start
Get timestamp for the start of a given year and month
data/amazon18_data_process_gpr.py:58
↓ 3 callers
Function
get_timestamp_start
Get timestamp for the start of a given year and month
data/amazon18_data_process.py:58
↓ 3 callers
Method
pre
(self, idx)
ts_rec_data.py:225
↓ 3 callers
Method
pre
(self, idx)
ts_rec_data.py:365
↓ 3 callers
Function
write_file
(path, data)
data/amazon23_data_process.py:370
↓ 3 callers
Function
write_json_file
(data, file_path)
data/amazon23_data_process.py:26
↓ 3 callers
Function
write_json_file
Write data to JSON file
data/amazon18_data_process.py:35
↓ 2 callers
Method
__init__
(self, hidden_size, item_num, state_size, gru_layers=1)
sasrec.py:87
↓ 2 callers
Method
_convert_to_semantic_ids
Convert item IDs to semantic ID format using index.json
data.py:1538
↓ 2 callers
Method
_convert_to_semantic_ids
Convert item IDs to semantic ID format using index.json
data.py:1721
↓ 2 callers
Function
analyze_codes
(codes, title="", verbose=True)
rq/rqkmeans_faiss.py:206
↓ 2 callers
Function
check_path
(path)
data/amazon23_data_process.py:22
↓ 2 callers
Function
clean_text
(raw_text)
rq/text2emb/utils.py:302
↓ 2 callers
Function
create_user_features
Create user features (U-Token)
data/amazon18_data_process_gpr.py:476
↓ 2 callers
Function
delete_file
(filename)
rq/utils.py:35
↓ 2 callers
Method
generate_prompt
(self, data_point)
ts_rec_data.py:55
↓ 2 callers
Function
get_first_nbits
(rq)
rq/rqkmeans_faiss.py:293
↓ 2 callers
Method
get_history
(self, row)
ts_rec_data.py:61
↓ 2 callers
Method
get_inputs
(self)
ts_rec_data.py:126
↓ 2 callers
Method
get_inputs
(self)
ts_rec_data.py:407
↓ 2 callers
Method
get_inputs
(self)
ts_rec_data.py:637
↓ 2 callers
Function
get_rq_codebooks
(rq)
rq/rqkmeans_faiss.py:88
↓ 2 callers
Function
get_timestamp_start
Return epoch seconds for start of a month.
data/amazon23_data_process.py:36
↓ 2 callers
Function
get_timestamp_start
(year, month)
data/process.py:13
↓ 2 callers
Function
load_json
(file)
rq/text2emb/utils.py:297
↓ 2 callers
Function
pairwise_sq_dists_batch
X: (B,d) C: (K,d)
rq/rqkmeans_faiss.py:18
↓ 2 callers
Function
parse_sid
(sid)
rl_gpr.py:86
↓ 2 callers
Method
pre
(self, idx)
ts_rec_data.py:583
↓ 2 callers
Function
set_seed
(seed)
rl.py:20
↓ 2 callers
Function
write_remap_index
Write index mapping to file
data/amazon18_data_process_gpr.py:41
↓ 2 callers
Function
write_remap_index
(index_map, file_path)
data/amazon23_data_process.py:31
↓ 2 callers
Function
write_remap_index
Write index mapping to file
data/amazon18_data_process.py:41
↓ 1 callers
Method
__init__
(self, input_size, output_size, emb_size, clusters_k=10)
utility.py:154
↓ 1 callers
Method
__init__
(self, hidden_size, num_units, num_heads, dropout_rate)
SASRecModules_ori.py:27
↓ 1 callers
Method
_build_optimizer
(self)
rq/trainer.py:49
↓ 1 callers
Method
_check_nan
(self, loss)
rq/trainer.py:93
↓ 1 callers
Method
_generate_train_loss_output
(self, epoch_idx, s_time, e_time, loss, recon_loss)
rq/trainer.py:174
↓ 1 callers
Method
_get_scheduler
(self)
rq/trainer.py:83
↓ 1 callers
Method
_load_data
(self)
sft.py:38
↓ 1 callers
Method
_load_data
(self)
ts_rec_sft.py:34
↓ 1 callers
Method
_load_data
(self)
sft_gpr.py:38
↓ 1 callers
Method
_move_model_to_vllm
(self)
minionerec_trainer.py:638
↓ 1 callers
Method
_prepare_inputs
(self, inputs: dict[str, Union[torch.Tensor, Any]])
minionerec_trainer.py:665
↓ 1 callers
Method
_prepare_preference_data
Prepare data directly from training samples
data.py:1511
↓ 1 callers
Method
_prepare_sequence_data
Prepare sequence prediction data from training samples
data.py:1694
↓ 1 callers
Method
_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 callers
Method
_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 callers
Method
_train_epoch
(self, train_data, epoch_idx)
rq/trainer.py:98
↓ 1 callers
Method
_valid_epoch
(self, valid_data)
rq/trainer.py:128
↓ 1 callers
Function
activation_layer
(activation_name="relu", emb_dim=None)
rq/models/layers.py:45
↓ 1 callers
Method
aggregate
(self, input_tensor)
utility.py:129
↓ 1 callers
Function
analyze_codes
Analyze code distribution and collision rate
rq/rqkmeans_constrained.py:149
↓ 1 callers
Function
analyze_duplication
(codes_df)
rq/generate_indices_plus.py:152
↓ 1 callers
Function
apply_rqkmeans_plus_strategy
(model, codebook_path, device)
rq/rqkmeans_plus.py:24
↓ 1 callers
Function
balanced_kmeans_level_constrained
Balanced K-means implemented with k-means-constrained
rq/rqkmeans_constrained.py:26
↓ 1 callers
Function
build_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 callers
Function
build_item_features_amazon23
Convert Amazon23 metadata to amazon18-style: - title - description (list → str) - features - categories -
data/amazon23_data_process.py:390
↓ 1 callers
Function
build_review_data_amazon23
Build review_data: key = (uid, iid, timestamp) value = {review, title}
data/amazon23_data_process.py:457
↓ 1 callers
Function
calcu_propensity_score
(buffer)
sasrec.py:401
↓ 1 callers
Function
calculate_hit_games_cuda
(prediction, topk_list, target, hit_all, ndcg_all)
sasrec.py:280
↓ 1 callers
Method
center_distance_for_constraint
(distances)
rq/models/vq.py:52
↓ 1 callers
Function
check_collision
(all_indices_str)
rq/generate_indices.py:18
↓ 1 callers
Function
check_collision
(all_indices_str)
rq/models/generate_indices.py:18
↓ 1 callers
Function
check_path
Create directory if it doesn't exist
data/amazon18_data_process_gpr.py:30
↓ 1 callers
Function
check_path
Create directory if it doesn't exist
data/amazon18_data_process.py:30
↓ 1 callers
Method
compute_loss
(self, model, inputs, return_outputs=False, num_items_in_batch=None)
minionerec_trainer.py:1035
↓ 1 callers
Method
compute_loss
(self, out, quant_loss, xs=None)
rq/models/rqvae.py:74
↓ 1 callers
Function
compute_residuals_upto_level
(rq, data, codes, upto_level, codebooks=None)
rq/rqkmeans_faiss.py:96
↓ 1 callers
Function
convert_interactions_amazon23
Convert interactions to amazon18-style: - user2index - item2index - user2items[user_index] = [item_index...] - interactions list
data/amazon23_data_process.py:221
↓ 1 callers
Function
convert_interactions_to_csv
Convert interaction data to MiniOneRec CSV format using semantic IDs
convert_dataset_gpr.py:54
↓ 1 callers
Function
convert_interactions_to_csv
Convert interaction data to MiniOneRec CSV format using semantic IDs
convert_dataset.py:54
↓ 1 callers
Function
convert_inters2dict_amazon18_style
Convert interactions to dict format like amazon18_data_process
data/amazon18_data_process_gpr.py:180
↓ 1 callers
Function
convert_inters2dict_amazon18_style
Convert interactions to dict format like amazon18_data_process
data/amazon18_data_process.py:180
↓ 1 callers
Function
convert_ms_to_sec
Amazon23 sort_timestamp is in milliseconds. Convert to seconds.
data/amazon23_data_process.py:41
↓ 1 callers
Function
convert_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 callers
Function
convert_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