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 TensorFrame #4

Merged
merged 11 commits into from
Aug 16, 2023
Merged

Add TensorFrame #4

merged 11 commits into from
Aug 16, 2023

Conversation

weihua916
Copy link
Contributor

We use tensor_encoder to transform DataFrame into TensorFrame.

@github-actions github-actions bot added the data label Aug 15, 2023
@weihua916 weihua916 requested a review from rusty1s August 15, 2023 03:55
torch_frame/data/tensor_frame.py Outdated Show resolved Hide resolved
torch_frame/data/tensor_frame.py Outdated Show resolved Hide resolved
torch_frame/data/tensor_frame.py Outdated Show resolved Hide resolved
torch_frame/data/tensor_frame.py Outdated Show resolved Hide resolved
torch_frame/data/tensor_frame.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
test/data/test_tensor_frame.py Outdated Show resolved Hide resolved
test/data/test_tensor_frame.py Outdated Show resolved Hide resolved
test/data/test_tensor_frame.py Outdated Show resolved Hide resolved
test/data/test_tensor_frame.py Outdated Show resolved Hide resolved
torch_frame/data/tensor_frame.py Outdated Show resolved Hide resolved
torch_frame/data/tensor_frame.py Outdated Show resolved Hide resolved
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 :)

torch_frame/data/__init__.py Outdated Show resolved Hide resolved
torch_frame/data/tensor_frame.py Outdated Show resolved Hide resolved
torch_frame/data/tensor_frame.py Outdated Show resolved Hide resolved
Comment on lines +29 to +31
if x.dim() != 2:
raise ValueError(
f"x_dict['{stype_name}'] is not a 2-dimensional tensor.")
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't it be < 2?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point. So far, we only support categorical/numerical/(ordinal) columns, so it should always be 2 dim. When we start supporting text/image columns, we can have a separate dimensionality check for those columns

test/data/test_tensor_frame.py Outdated Show resolved Hide resolved
@weihua916 weihua916 merged commit beb3089 into master Aug 16, 2023
6 of 7 checks passed
@weihua916 weihua916 deleted the tensor_frame branch August 16, 2023 18:42
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