Skip to content

Commit

Permalink
Fix #117: Fix fill_na when copy from a column
Browse files Browse the repository at this point in the history
  • Loading branch information
xpai committed Oct 14, 2024
1 parent d9a96c7 commit 9758a89
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 30 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@
[Doing] Add support for saving pb file, exporting embeddings
[Doing] Add support of multi-gpu training

**FuxiCTR v2.3.3, 2024-10-14**
+ [Feature] Add EulerNet and DCNv3 models
+ [Feature] Add support to parquet as input, like csv format
+ [Fix] Add col_name as default args in feature_preprocess ([#105](https://github.com/reczoo/FuxiCTR/issues/105))
+ [Fix] Fix fill_na when copy from a column ([#117](https://github.com/reczoo/FuxiCTR/issues/117))

**FuxiCTR v2.3.2, 2024-07-11**
+ [Feature] Add TransAct model
+ [Feature] Add new feature type `embedding`, supporting [`meta`, `numeric`, `embedding`, `categorical`, `sequence`]
Expand Down
39 changes: 20 additions & 19 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,3 @@
## Contributing to FuxiCTR

Contributions are always welcome. If you are interested in contributing to FuxiCTR, your contributions will likely fall into one of the following two categories:

+ You want to implement a new feature:

In general, we accept any features that fit the scope of this package. A good starting place is [the project plan page](https://github.com/xue-pai/FuxiCTR/projects) that shows the current milestones. All contributions must go through pull requests and will be reviewed by the committers. **To avoid redudant efforts, please first open a feature request and propose your design if you want to implement a new feature. After discussing with the committers, you could start the implememntation and send out a PR.**

+ You want to fix a bug:

Feel free to send a pull request for bug fix. Please provide a clear and concise description of what the bug was. If you are unsure about if this is a bug at all or how to fix, post an issue about this.

Once your contribution is accepted and merged, you become a contributor to FuxiCTR. We will put your name in the contributor list.

## Committers

+ Jieming Zhu from Huawei Noah's Ark Lab
+ Jinyang Liu from The Chinese University of Hong Kong

## Contributors 🤗

<!-- readme: zhujiem,doubleQ2018,Da-Guo,kyriemao,contributors -start -->
Expand Down Expand Up @@ -122,3 +103,23 @@ Once your contribution is accepted and merged, you become a contributor to FuxiC
<tbody>
</table>
<!-- readme: zhujiem,doubleQ2018,Da-Guo,kyriemao,contributors -end -->

## Committers

+ Jieming Zhu, Huawei Noah's Ark Lab
+ Jinyang Liu, The Chinese University of Hong Kong

## How to Contribute

Contributions are always welcome. If you are interested in contributing to FuxiCTR, your contributions will likely fall into one of the following two categories:

+ You want to implement a new feature:

In general, we accept any features that fit the scope of this package. A good starting place is [the project plan page](https://github.com/xue-pai/FuxiCTR/projects) that shows the current milestones. All contributions must go through pull requests and will be reviewed by the committers. **To avoid redudant efforts, please first open a feature request and propose your design if you want to implement a new feature. After discussing with the committers, you could start the implememntation and send out a PR.**

+ You want to fix a bug:

Feel free to send a pull request for bug fix. Please provide a clear and concise description of what the bug was. If you are unsure about if this is a bug at all or how to fix, post an issue about this.

Once your contribution is accepted and merged, you become a contributor to FuxiCTR. We will put your name in the contributor list.

6 changes: 0 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,9 +160,3 @@ If you find our code or benchmarks helpful in your research, please cite the fol

+ Jieming Zhu, Jinyang Liu, Shuai Yang, Qi Zhang, Xiuqiang He. [Open Benchmarking for Click-Through Rate Prediction](https://arxiv.org/abs/2009.05794). *The 30th ACM International Conference on Information and Knowledge Management (CIKM)*, 2021. [[Bibtex](https://dblp.org/rec/conf/cikm/ZhuLYZH21.html?view=bibtex)]
+ Jieming Zhu, Quanyu Dai, Liangcai Su, Rong Ma, Jinyang Liu, Guohao Cai, Xi Xiao, Rui Zhang. [BARS: Towards Open Benchmarking for Recommender Systems](https://arxiv.org/abs/2205.09626). *The 45th International ACM SIGIR Conference on Research and Development in Information Retrieval (SIGIR)*, 2022. [[Bibtex](https://dblp.org/rec/conf/sigir/ZhuDSMLCXZ22.html?view=bibtex)]

## Discussion

Welcome to join our WeChat group for any question and discussion. We also have open positions for internships and full-time jobs. If you are interested in research and practice in recommender systems, please reach out via our WeChat group.

![Scan QR code](https://openbenchmark.github.io/BARS/_images/wechat.jpg)
9 changes: 6 additions & 3 deletions fuxictr/preprocess/feature_processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,10 @@ def preprocess(self, ddf):
all_cols = self.label_cols + self.feature_cols[::-1]
for col in all_cols:
name = col["name"]
if name in ddf.columns:
fill_na = "" if col["dtype"] in ["str", str] else 0
fill_na = col.get("fill_na", fill_na)
fill_na = col.get("fill_na",
"" if col["dtype"] in ["str", str] else 0)
col_exist = name in ddf.columns
if col_exist:
ddf = ddf.with_columns(pl.col(name).fill_null(fill_na))
if col.get("preprocess"):
preprocess_args = re.split(r"\(|\)", col["preprocess"])
Expand All @@ -118,6 +119,8 @@ def preprocess(self, ddf):
.alias(name)
.cast(self.dtype_dict[name])
)
if not col_exist:
ddf = ddf.with_columns(pl.col(name).fill_null(fill_na))
active_cols = [col["name"] for col in all_cols if col.get("active") != False]
ddf = ddf.select(active_cols)
return ddf
Expand Down
2 changes: 1 addition & 1 deletion fuxictr/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__="2.3.2"
__version__="2.3.3"
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="2.3.2",
version="2.3.3",
author="RECZOO",
author_email="[email protected]",
description="A configurable, tunable, and reproducible library for CTR prediction",
Expand Down

0 comments on commit 9758a89

Please sign in to comment.