Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add StypeWiseFeatureEncoder #16

Merged
merged 28 commits into from
Aug 22, 2023
Merged

Add StypeWiseFeatureEncoder #16

merged 28 commits into from
Aug 22, 2023

Conversation

weihua916
Copy link
Contributor

@weihua916 weihua916 commented Aug 19, 2023

This PR adds StypeWiseFeatureEncoder that encode feature in stype-wise manner, e.g., use EmbeddingEncoder for categorical stype, use LinearEncoder for numerical stype etc.

Somehow I screw up the commit. Not sure why FT-Transformer model is also included in this PR (col_stats also includes FT-Transformer PR, so really not sure what's happening here.)

torch_frame/__init__.py Outdated Show resolved Hide resolved
Copy link
Member

@zechengz zechengz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In general LGTM. Left some comments.

torch_frame/nn/encoder/stype_encoder.py Outdated Show resolved Hide resolved
torch_frame/nn/encoder/stype_encoder.py Outdated Show resolved Hide resolved
torch_frame/nn/encoder/stypewise_encoder.py Outdated Show resolved Hide resolved
torch_frame/nn/encoder/stypewise_encoder.py Outdated Show resolved Hide resolved
torch_frame/nn/encoder/stype_encoder.py Outdated Show resolved Hide resolved
test/nn/encoder/test_stypewise_encoder.py Outdated Show resolved Hide resolved
torch_frame/nn/encoder/stype_encoder.py Outdated Show resolved Hide resolved
test/nn/encoder/test_stypewise_encoder.py Outdated Show resolved Hide resolved
torch_frame/nn/base.py Show resolved Hide resolved
@weihua916 weihua916 requested a review from rusty1s August 21, 2023 05:44
Base automatically changed from col_stats to master August 21, 2023 06:30
Copy link
Member

@rusty1s rusty1s left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great. Love the einsum usage on the Linear layer part :)

Would personally prefer to rename Stype back to lower-case, but this is certainly personal preference.

test/conftest.py Outdated Show resolved Hide resolved
torch_frame/__init__.py Outdated Show resolved Hide resolved
torch_frame/data/tensor_frame.py Outdated Show resolved Hide resolved
torch_frame/nn/__init__.py Outdated Show resolved Hide resolved
torch_frame/nn/encoder/stype_encoder.py Show resolved Hide resolved
torch_frame/nn/encoder/stype_encoder.py Outdated Show resolved Hide resolved
torch_frame/stype.py Outdated Show resolved Hide resolved
@weihua916 weihua916 merged commit 25b8793 into master Aug 22, 2023
8 checks passed
@weihua916 weihua916 deleted the colwise_encoder branch August 22, 2023 19:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants