Skip to content

[FutureWarn] Fix FutureWarning in CategoricalTensorMapper. #401

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

Merged
merged 2 commits into from
May 28, 2024

Conversation

drivanov
Copy link
Contributor

The following FutureWarning is fixed:

test/data/test_mapper.py::test_categorical_tensor_mapper
  /usr/local/lib/python3.10/dist-packages/torch_frame/data/mapper.py:113: FutureWarning: Series.__getitem__ 
treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels 
(consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`
    ser = pd.Series(self.categories[index].index)

@drivanov drivanov changed the title Fix FutureWarning in CategoricalTensorMapper. [FutureWarn] Fix FutureWarning in CategoricalTensorMapper. May 22, 2024
@rusty1s rusty1s enabled auto-merge (squash) May 27, 2024 07:16
@rusty1s rusty1s merged commit 6587e0f into pyg-team:master May 28, 2024
12 checks passed
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.

4 participants