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

[UserWarning] Fixing UserWarnings in two tests. #409

Merged
merged 4 commits into from
Jun 12, 2024

Conversation

drivanov
Copy link
Contributor

@drivanov drivanov commented Jun 6, 2024

The following UserWarnings are fixed:

test/transforms/test_cat_to_num_transform.py::test_cat_to_num_transform_on_categorical_only_dataset[True]
test/transforms/test_cat_to_num_transform.py::test_cat_to_num_transform_on_categorical_only_dataset[False]
  /opt/pyg/pytorch-frame/test/transforms/test_cat_to_num_transform.py:55: UserWarning: To copy construct from a tensor, 
it is recommended to use sourceTensor.clone().detach() or sourceTensor.clone().detach().requires_grad_(True), rather 
than torch.tensor(sourceTensor).
    assert torch.allclose(

test/transforms/test_cat_to_num_transform.py::test_cat_to_num_transform_with_loading[TaskType.REGRESSION]
test/transforms/test_cat_to_num_transform.py::test_cat_to_num_transform_with_loading[TaskType.BINARY_CLASSIFICATION]
  /opt/pyg/pytorch-frame/test/transforms/test_cat_to_num_transform.py:138: UserWarning: To copy construct from a tensor, 
it is recommended to use sourceTensor.clone().detach() or sourceTensor.clone().detach().requires_grad_(True), rather 
than torch.tensor(sourceTensor).
    assert torch.allclose(

@yiweny yiweny merged commit 3ea4bfc into pyg-team:master Jun 12, 2024
12 checks passed
@drivanov drivanov deleted the copy_construct branch June 13, 2024 17:56
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