Skip to content

Commit

Permalink
Add tests and update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
xpai committed Mar 7, 2022
1 parent a855d1f commit 7c196a9
Show file tree
Hide file tree
Showing 7 changed files with 161 additions and 92 deletions.
78 changes: 39 additions & 39 deletions README.md

Large diffs are not rendered by default.

28 changes: 19 additions & 9 deletions UPDATES.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,32 @@
## FuxiCTR's Milestones
## FuxiCTR Milestones


### FuxiCTR v2.0, Doing.
## FuxiCTR v2.0, Doing.
+ Add more models of year 2021.
+ Add support for saving pb file, exporting embeddings, exporting feature vocab


### FuxiCTR v1.1, 2021-12-12.
## FuxiCTR v1.1

### FuxiCTR v1.1.1, 2022-03-01
+ Add DESTINE/MaskNet models

### FuxiCTR v1.1.0, 2021-12-12.
+ Refactor the code of layers.EmbeddingLayer
+ Fix the defect in padding_idx
+ Fix the defect in loading pretrain embeddings
+ Add support for loading blocks of h5 data
+ Add tests for DIN, FmFM
+ Refine the DIN model
+ Add tutorials on how to use sequence features and pretrain embeddings
+ Refine the DIN model to support feature concatenation
+ Add tutorials on how to use sequence features and pretrained embeddings
+ Fix the defect in using padding_idx (no impact on Criteo/Avazu results)
+ Fix the defect in loading pretrain embeddings (no impact on Criteo/Avazu results)

## FuxiCTR v1.0

### FuxiCTR v1.0.2, 2021-12-01
Refactor the code and documentation to support reproducing steps on [the BARS benchmark](https://github.com/openbenchmark/BARS/tree/master/ctr_prediction/benchmarks).

### FuxiCTR v1.0, 2021-10-01
This is the first release of FuxiCTR, including 28 models: LR, FM, CCPM, FFM, DNN, Wide&Deep, FNN, IPNN, DeepCross, HOFM, DeepFM, NFM, AFM, DCN, FwFM, xDeepFM, DIN, FiGNN, AutoInt+, FiBiNET, FGCNN, HFM+, ONN, AFN+, LorentzFM, InterHAt, FLEN, FmFM. Especially, this version corresponds to the original implementations used for reproducing the experiments in the following paper: Jieming Zhu, Jinyang Liu, Shuai Yang, Qi Zhang, Xiuqiang He. Open Benchmarking for CTR Prediction, CIKM 2021.
### FuxiCTR v1.0.1, 2021-10-01
This is the first release of FuxiCTR, including 28 models: LR, FM, CCPM, FFM, DNN, Wide&Deep, FNN, IPNN, DeepCross, HOFM, DeepFM, NFM, AFM, DCN, FwFM, xDeepFM, DIN, FiGNN, AutoInt+, FiBiNET, FGCNN, HFM+, ONN, AFN+, LorentzFM, InterHAt, FLEN, FmFM. Especially, this version corresponds to the original implementations used for reproducing the experiments in the following paper: *Jieming Zhu, Jinyang Liu, Shuai Yang, Qi Zhang, Xiuqiang He, Open Benchmarking for CTR Prediction, CIKM 2021*.



Expand Down
59 changes: 58 additions & 1 deletion config/model_config/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -756,4 +756,61 @@ DIN_test:
shuffle: True
seed: 2019
monitor: 'AUC'
monitor_mode: 'max'
monitor_mode: 'max'

DESTINE_test:
model: DESTINE
dataset_id: taobao_tiny
loss: 'binary_crossentropy'
metrics: ['logloss', 'AUC']
task: binary_classification
optimizer: adam
learning_rate: 1.e-3
embedding_regularizer: 0
net_regularizer: 0
batch_size: 128
embedding_dim: 4
attention_dim: 4
num_heads: 2
attention_layers: 2
dnn_hidden_units: [64, 32]
dnn_activations: relu
att_dropout: 0
net_dropout: 0
relu_before_att: False
use_scale: True
use_wide: False
residual_mode: "each_layer"
batch_norm: True
epochs: 1
shuffle: True
seed: 2021
monitor: 'AUC'
monitor_mode: 'max'

MaskNet_test:
model: MaskNet
dataset_id: taobao_tiny
loss: 'binary_crossentropy'
metrics: ['logloss', 'AUC']
task: binary_classification
optimizer: adam
learning_rate: 1.e-3
embedding_regularizer: 0
net_regularizer: 0
batch_size: 128
embedding_dim: 4
dnn_hidden_units: [64, 32]
dnn_hidden_activations: relu
model_type: SerialMaskNet
parallel_num_blocks: 1
parallel_block_dim: 64
reduction_ratio: 1
emb_layernorm: True
net_layernorm: True
net_dropout: 0
epochs: 1
shuffle: True
seed: 2021
monitor: 'AUC'
monitor_mode: 'max'
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setuptools.setup(
name="fuxictr",
version="1.1.0",
version="1.1.1",
author="zhujiem",
author_email="zhujiem@users.noreply.github.com",
description="A configurable, tunable, and reproducible library for CTR prediction",
Expand Down
64 changes: 33 additions & 31 deletions tests/test_all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,37 +2,39 @@

cd ../benchmarks

# python run_expid.py --expid AFM_test && \
python run_expid.py --expid AFM_test && \
python run_expid.py --expid AFN_test && \
# python run_expid.py --expid AutoInt_test && \
# python run_expid.py --expid CCPM_test && \
# python run_expid.py --expid DCN_test && \
# python run_expid.py --expid DeepCrossing_test && \
# python run_expid.py --expid DeepFM_test && \
# python run_expid.py --expid DNN_test && \
# python run_expid.py --expid FFM_test && \
# python run_expid.py --expid FGCNN_test && \
# python run_expid.py --expid FiBiNET_test && \
# python run_expid.py --expid FiGNN_test && \
# python run_expid.py --expid FM_test && \
# python run_expid.py --expid FNN_test && \
# python run_expid.py --expid FwFM_test && \
# python run_expid.py --expid HFM_test && \
# python run_expid.py --expid HOFM_test && \
# python run_expid.py --expid InterHAt_test && \
# python run_expid.py --expid LorentzFM_test && \
# python run_expid.py --expid LR_test && \
# python run_expid.py --expid NFM_test && \
# python run_expid.py --expid ONN_test && \
# python run_expid.py --expid PNN_test && \
# python run_expid.py --expid WideDeep_test && \
# python run_expid.py --expid xDeepFM_test && \
# python run_expid.py --expid FmFM_test && \
# python run_expid.py --expid DCNv2_test && \
# python run_expid.py --expid ONNv2_test && \
# python run_expid.py --expid FFMv2_test && \
# python run_expid.py --expid DeepIM_test && \
# python run_expid.py --expid FLEN_test && \
# python run_expid.py --expid DIN_test
python run_expid.py --expid AutoInt_test && \
python run_expid.py --expid CCPM_test && \
python run_expid.py --expid DCN_test && \
python run_expid.py --expid DeepCrossing_test && \
python run_expid.py --expid DeepFM_test && \
python run_expid.py --expid DNN_test && \
python run_expid.py --expid FFM_test && \
python run_expid.py --expid FGCNN_test && \
python run_expid.py --expid FiBiNET_test && \
python run_expid.py --expid FiGNN_test && \
python run_expid.py --expid FM_test && \
python run_expid.py --expid FNN_test && \
python run_expid.py --expid FwFM_test && \
python run_expid.py --expid HFM_test && \
python run_expid.py --expid HOFM_test && \
python run_expid.py --expid InterHAt_test && \
python run_expid.py --expid LorentzFM_test && \
python run_expid.py --expid LR_test && \
python run_expid.py --expid NFM_test && \
python run_expid.py --expid ONN_test && \
python run_expid.py --expid PNN_test && \
python run_expid.py --expid WideDeep_test && \
python run_expid.py --expid xDeepFM_test && \
python run_expid.py --expid FmFM_test && \
python run_expid.py --expid DCNv2_test && \
python run_expid.py --expid ONNv2_test && \
python run_expid.py --expid FFMv2_test && \
python run_expid.py --expid DeepIM_test && \
python run_expid.py --expid FLEN_test && \
python run_expid.py --expid DIN_test && \
python run_expid.py --expid DESTINE_test && \
python run_expid.py --expid MaskNet_test

echo "All tests done."
18 changes: 9 additions & 9 deletions tests/test_all_gpu.sh
Original file line number Diff line number Diff line change
@@ -1,14 +1,5 @@
#! /bin/sh

# Copyright (C) 2021. Huawei Technologies Co., Ltd. All rights reserved.

# This program is free software; you can redistribute it and/or modify it under
# the terms of the MIT license.

# This program is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE. See the MIT License for more details.

cd ../benchmarks

python run_expid.py --expid AFM_test --gpu 0 && \
Expand Down Expand Up @@ -36,5 +27,14 @@ python run_expid.py --expid ONN_test --gpu 0 && \
python run_expid.py --expid PNN_test --gpu 0 && \
python run_expid.py --expid WideDeep_test --gpu 0 && \
python run_expid.py --expid xDeepFM_test --gpu 0
python run_expid.py --expid FmFM_test --gpu 0 && \
python run_expid.py --expid DCNv2_test --gpu 0 && \
python run_expid.py --expid ONNv2_test --gpu 0 && \
python run_expid.py --expid FFMv2_test --gpu 0 && \
python run_expid.py --expid DeepIM_test --gpu 0 && \
python run_expid.py --expid FLEN_test --gpu 0 && \
python run_expid.py --expid DIN_test --gpu 0 && \
python run_expid.py --expid DESTINE_test --gpu 0 && \
python run_expid.py --expid MaskNet_test --gpu 0

echo "All tests done."
4 changes: 2 additions & 2 deletions tutorials/README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

+ [FuXiCTR的安装和使用](https://zhuanlan.zhihu.com/p/456280709), by oldsummer.

+ [[FuxiCTR] CTR模型的高效、高性能实现(一)](https://zhuanlan.zhihu.com/p/437373335), by苏良才
+ [[FuxiCTR] CTR模型的高效、高性能实现(一)](https://zhuanlan.zhihu.com/p/437373335), by 苏良才

+ [[FuxiCTR] CTR预估模型的高效、高性能实现(二)](https://zhuanlan.zhihu.com/p/453385054), by苏良才
+ [[FuxiCTR] CTR预估模型的高效、高性能实现(二)](https://zhuanlan.zhihu.com/p/453385054), by 苏良才

0 comments on commit 7c196a9

Please sign in to comment.