Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
96 commits
Select commit Hold shift + click to select a range
a36483f
[feat] add config and proto files
czffzc Jul 15, 2025
a3d7470
[feat]:backbone framework
czffzc Jul 25, 2025
7f9daa9
[feat]:add dag class
czffzc Jul 25, 2025
d2d8450
[feat]:add dag class
czffzc Jul 25, 2025
b81c18c
[fix]:remove tzrec/utils/day.py
czffzc Jul 25, 2025
54c7985
[feat] update proto
czffzc Jul 25, 2025
d895ddf
[feat] update proto
czffzc Jul 25, 2025
f140654
[feat] export MLP
czffzc Jul 25, 2025
9a16756
[feat] get final block output dim
czffzc Jul 28, 2025
0dbb600
[feat] update multi_tower backbone config file
czffzc Jul 28, 2025
73da4ec
[feat]:computer block input dim with input_fn
czffzc Aug 1, 2025
bd115c8
[feat]:backbone support lambda expression as input_fn
czffzc Aug 1, 2025
9890913
[feat] support deepfm and lambda input layer
czffzc Aug 5, 2025
4ca916e
[feat]:backbone module support DIN
czffzc Aug 6, 2025
a3f06b6
[feat]:backbone supprot multi_task model mmoe
czffzc Aug 7, 2025
a37c0db
[fix[:set embedding group none
czffzc Aug 7, 2025
a6c0434
[fix] remove print
czffzc Aug 8, 2025
2c2bef4
[fix] add __init__.py in layers
czffzc Aug 8, 2025
ecf58fe
[fix] FX tracing not support len()
czffzc Aug 8, 2025
910976b
[fix] fix pre-commit error
czffzc Aug 11, 2025
232922a
[feat] add pygraphvix pip install config
czffzc Aug 11, 2025
5b6e30a
[feat] add networkx pip install config
czffzc Aug 11, 2025
f1ada5a
[fix] pre-commit error trim trailing whitespace
czffzc Aug 11, 2025
16d4ce6
[fix] pre-commit error Sorting requirements/runtime.txt
czffzc Aug 11, 2025
c330a10
[fix] fix CI test in backbone module test
czffzc Aug 11, 2025
f583337
[feat] backbone support dssm
czffzc Aug 12, 2025
908edda
[fix] ci-test CodeStyleCI fix
czffzc Aug 12, 2025
99535ba
[fix] fm only support 3D tensor
czffzc Aug 12, 2025
8f70ebe
[fix] pre commit fix
czffzc Aug 12, 2025
311871f
[fix] Copyright (c) 2025
czffzc Aug 12, 2025
e53d45d
[feat] backbone support DCN
czffzc Aug 13, 2025
ee35de9
[feat] add DCN backbone taobao local config
czffzc Aug 13, 2025
4c7ed15
[feat] backbone support DCN using recurrent layer
czffzc Aug 13, 2025
02f3dc4
[fix] remove init_input in rank_backbone
czffzc Aug 14, 2025
2322fe3
[fix] clean all keras layer
czffzc Aug 14, 2025
8ec3a5a
[fix] remove annotation
czffzc Aug 14, 2025
4ca07f2
[feat] remove DAG class, use networkx
czffzc Aug 14, 2025
1f3117e
[fix] delete dag.py
czffzc Aug 14, 2025
6b020a8
[fix] remove task tower config in multi_task_backbone
czffzc Aug 14, 2025
5de7fe2
[fix] remove safe_mode in lambda inference
czffzc Aug 14, 2025
efc4229
[fix] remove has_reuse in layer_cls
czffzc Aug 15, 2025
0953f48
[fix] remove reuse
czffzc Aug 15, 2025
5aaa6d9
[feat] make input inference dim to a const list
czffzc Aug 15, 2025
59018c8
[fix] try-except to if-else
czffzc Aug 15, 2025
e9626d4
[fix] param_type is None may also need input_dim inference
czffzc Aug 15, 2025
1db976c
[fix] remove l2_reg parameter
czffzc Aug 18, 2025
cf63cb4
[fix] move backbone to modules folder and move dim_infer and lambda_i…
czffzc Aug 18, 2025
fe7d204
[fix] fix import error
czffzc Aug 18, 2025
60bc3d0
[feat] backbone support masknet
czffzc Aug 18, 2025
5243737
[feat] add MaskBlock config to backbone proto
czffzc Aug 18, 2025
4074e7e
[fix] output_concat_axis in repeat may revise block output dim
czffzc Aug 19, 2025
6413ce0
[fix] fix dim infer in repeat layer when has output_concat_axis
czffzc Aug 20, 2025
80969ee
[fix] remove some fallback dim infer logig
czffzc Aug 20, 2025
1ed99c7
[fix] annotate fallback
czffzc Aug 20, 2025
50c8516
[fix] remove annotation and fix multi_task proto
czffzc Aug 21, 2025
2f3511e
[fix] pre-commit fix
czffzc Aug 21, 2025
5183979
[fix] rename get_final_output_dim to output_dim
czffzc Aug 21, 2025
1b26136
[fix] rename backbone proto model name as ModularRank, ModularMatch, …
czffzc Aug 21, 2025
e84668e
[fix] rename backbone model
czffzc Aug 21, 2025
3af7fa4
[fix] remove is_training parameter
czffzc Aug 22, 2025
ed6e9b0
[feat] backbone support sequential, but Linear need in_features
czffzc Aug 22, 2025
becb3ab
[feat] wide&deep support lambda modular
czffzc Sep 9, 2025
a20de67
[feat] English annotations
czffzc Sep 9, 2025
8f819ff
Merge remote-tracking branch 'origin/master' into backbone
czffzc Sep 9, 2025
2d4bac1
[fix] pre-commit fix
czffzc Sep 9, 2025
7ddeda5
[feat] English annotations
czffzc Sep 9, 2025
2331aa1
[fix] Remove layers directory and all of its contents
czffzc Sep 10, 2025
cb27ac2
[fix] Remove my DCN module
czffzc Sep 10, 2025
160a134
[feat] update sequential_mlp_backbone.config
czffzc Sep 10, 2025
d0bd484
[remove] my fm and add moduel
czffzc Sep 10, 2025
6fc15cd
[feat] add multi_tower_din_backbone config
czffzc Sep 10, 2025
9b6a20c
[feat] update init.py delete old cross module
czffzc Sep 10, 2025
e8a015a
[fix] pre-commit fix config
czffzc Sep 10, 2025
55b870a
[fix] update proto
czffzc Sep 10, 2025
10fcbb6
[fix] delete wide&deep backbone config with add module
czffzc Sep 10, 2025
3800fe6
English annotations and partial Missing parameter annotation
czffzc Sep 10, 2025
563b890
[fix] partial Missing parameter annotation
czffzc Sep 10, 2025
d7a83d4
[fix] config move to component directory
czffzc Sep 10, 2025
909888b
[fix] fix Missing return annotation in lambda_inference.py
czffzc Sep 10, 2025
7d579ec
[fix] fix partial PyTyping CI test
czffzc Sep 10, 2025
1b52ad2
[fix] Incompatible parameter type
czffzc Sep 10, 2025
66d3ce5
[feat] add lambda infer unit test
czffzc Sep 11, 2025
b1133e6
[feat] add dimension infer unit test
czffzc Sep 11, 2025
ced76e8
Rename folder from component to modular
czffzc Sep 11, 2025
b0d388d
[fix] delete not backbone config
czffzc Sep 11, 2025
79a8bc3
[fix] delete config
czffzc Sep 11, 2025
278fa59
[feat] add load class unit test
czffzc Sep 11, 2025
ddb803c
[fix] remove print in lambda inference test
czffzc Sep 11, 2025
46ae140
[fix] remvoe print in dimension infer test
czffzc Sep 11, 2025
0271b93
[fix] delete enhanced_embedding.py
czffzc Sep 11, 2025
a70cdca
[fix] use logger in logging_util and remove test prints
czffzc Sep 11, 2025
cf28bf0
[fix] annotation
czffzc Sep 11, 2025
3ceccbf
[fix] PyTying fix
czffzc Sep 12, 2025
cc677e1
add launch.json
czffzc Sep 12, 2025
4121eae
[feat] launch.json
czffzc Sep 12, 2025
7709a19
[fix] pytyping fix
czffzc Sep 12, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
319 changes: 319 additions & 0 deletions examples/modular/match/dssm_taobao_local_backbone.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,319 @@
train_input_path: "data/taobao_data_recall_train/*.parquet"
eval_input_path: "data/taobao_data_recall_eval/*.parquet"
model_dir: "experiments/dssm_taobao_backbone"

train_config {
sparse_optimizer {
adagrad_optimizer {
lr: 0.001
}
constant_learning_rate {
}
}
dense_optimizer {
adam_optimizer {
lr: 0.001
}
constant_learning_rate {
}
}
num_epochs: 8
}

eval_config {
}

data_config {
batch_size: 2048
dataset_type: ParquetDataset
fg_mode: FG_DAG
label_fields: "clk"
num_workers: 8
negative_sampler {
input_path: "data/taobao_ad_feature_gl"
num_sample: 4096
attr_fields: "adgroup_id"
attr_fields: "cate_id"
attr_fields: "campaign_id"
attr_fields: "customer"
attr_fields: "brand"
attr_fields: "price"
item_id_field: "adgroup_id"
attr_delimiter: "\x02"
}
}

feature_configs {
id_feature {
feature_name: "user_id"
expression: "user:user_id"
num_buckets: 1141730
embedding_dim: 16
}
}
feature_configs {
id_feature {
feature_name: "cms_segid"
expression: "user:cms_segid"
num_buckets: 98
embedding_dim: 16
}
}
feature_configs {
id_feature {
feature_name: "cms_group_id"
expression: "user:cms_group_id"
num_buckets: 14
embedding_dim: 16
}
}
feature_configs {
id_feature {
feature_name: "final_gender_code"
expression: "user:final_gender_code"
num_buckets: 3
embedding_dim: 16
}
}
feature_configs {
id_feature {
feature_name: "age_level"
expression: "user:age_level"
num_buckets: 8
embedding_dim: 16
}
}
feature_configs {
id_feature {
feature_name: "pvalue_level"
expression: "user:pvalue_level"
num_buckets: 5
embedding_dim: 16
}
}
feature_configs {
id_feature {
feature_name: "shopping_level"
expression: "user:shopping_level"
num_buckets: 5
embedding_dim: 16
}
}
feature_configs {
id_feature {
feature_name: "occupation"
expression: "user:occupation"
num_buckets: 3
embedding_dim: 16
}
}
feature_configs {
id_feature {
feature_name: "new_user_class_level"
expression: "user:new_user_class_level"
num_buckets: 6
embedding_dim: 16
}
}
feature_configs {
id_feature {
feature_name: "adgroup_id"
expression: "item:adgroup_id"
num_buckets: 846812
embedding_dim: 16
}
}
feature_configs {
id_feature {
feature_name: "cate_id"
expression: "item:cate_id"
num_buckets: 12961
embedding_dim: 16
}
}
feature_configs {
id_feature {
feature_name: "campaign_id"
expression: "item:campaign_id"
num_buckets: 423438
embedding_dim: 16
}
}
feature_configs {
id_feature {
feature_name: "customer"
expression: "item:customer"
num_buckets: 255877
embedding_dim: 16
}
}
feature_configs {
id_feature {
feature_name: "brand"
expression: "item:brand"
num_buckets: 461498
embedding_dim: 16
}
}
feature_configs {
raw_feature {
feature_name: "price"
expression: "item:price"
boundaries: [1.1, 2.2, 3.6, 5.2, 7.39, 9.5, 10.5, 12.9, 15, 17.37, 19, 20, 23.8, 25.8, 28, 29.8, 31.5, 34, 36, 38, 39, 40, 45, 48, 49, 51.6, 55.2, 58, 59, 63.8, 68, 69, 72, 78, 79, 85, 88, 90, 97.5, 98, 99, 100, 108, 115, 118, 124, 128, 129, 138, 139, 148, 155, 158, 164, 168, 171.8, 179, 188, 195, 198, 199, 216, 228, 238, 248, 258, 268, 278, 288, 298, 299, 316, 330, 352, 368, 388, 398, 399, 439, 478, 499, 536, 580, 599, 660, 699, 780, 859, 970, 1080, 1280, 1480, 1776, 2188, 2798, 3680, 5160, 8720]
embedding_dim: 16
}
}
feature_configs {
id_feature {
feature_name: "pid"
expression: "context:pid"
hash_bucket_size: 20
embedding_dim: 16
}
}
feature_configs {
sequence_feature {
sequence_name: "click_50_seq"
sequence_length: 100
sequence_delim: "|"
features {
id_feature {
feature_name: "adgroup_id"
expression: "item:adgroup_id"
num_buckets: 846812
embedding_dim: 16
}
}
features {
id_feature {
feature_name: "cate_id"
expression: "item:cate_id"
num_buckets: 12961
embedding_dim: 16
}
}
features {
id_feature {
feature_name: "brand"
expression: "item:brand"
num_buckets: 461498
embedding_dim: 16
}
}
}
}

model_config {
feature_groups {
group_name: "user"
feature_names: "user_id"
feature_names: "cms_segid"
feature_names: "cms_group_id"
feature_names: "final_gender_code"
feature_names: "age_level"
feature_names: "pvalue_level"
feature_names: "shopping_level"
feature_names: "occupation"
feature_names: "new_user_class_level"
feature_names: "pid"
sequence_groups {
group_name: "click_50_seq"
feature_names: "click_50_seq__adgroup_id"
feature_names: "click_50_seq__cate_id"
feature_names: "click_50_seq__brand"
}
sequence_encoders {
pooling_encoder: {
input: "click_50_seq"
pooling_type: "mean"
}
}
group_type: DEEP
}
feature_groups {
group_name: "item"
feature_names: "adgroup_id"
feature_names: "cate_id"
feature_names: "campaign_id"
feature_names: "customer"
feature_names: "brand"
feature_names: "price"
group_type: DEEP
}

# 使用组件化的match_backbone配置
match_backbone {
backbone {
# 主要的backbone block定义
blocks {
name: "user"
inputs {
feature_group_name: "user"
}
input_layer {
}
}
blocks {
name: "item"
inputs {
feature_group_name: "item"
}
input_layer {
}
}
# 用户塔MLP
blocks {
name: "user_tower"
inputs {
block_name: "user"
}
module {
class_name: "MLP"
mlp {
hidden_units: [512, 256, 128]
activation: "nn.ReLU"
use_bn: false
dropout_ratio: [0.0, 0.0, 0.0]
}
}
}
# 物品塔MLP
blocks {
name: "item_tower"
inputs {
block_name: "item"
}
module {
class_name: "MLP"
mlp {
hidden_units: [512, 256, 128]
activation: "nn.ReLU"
use_bn: false
dropout_ratio: [0.0, 0.0, 0.0]
}
}
}
# 输出blocks配置 - 指定用户塔和物品塔的输出
output_blocks: "user_tower"
output_blocks: "item_tower"
}
model_params {
# 可以在这里配置一些通用参数
# 具体的output_dim、similarity等参数会通过代码默认值处理
}
}

metrics {
recall_at_k {
top_k: 1
}
}
metrics {
recall_at_k {
top_k: 5
}
}
losses {
softmax_cross_entropy {}
}
}
Loading