Skip to content

Conversation

@Balandat
Copy link
Collaborator

Previously this code would raise the following:

linear_operator\utils\interpolation.py:71: UserWarning: torch.sparse.SparseTensor(indices, values, shape, *, device=) is deprecated.  Please use torch.sparse_coo_tensor(indices, values, shape, dtype=, device=). (Triggered internally at ..\torch\csrc\utils\tensor_new.cpp:620.)
  summing_matrix = cls(summing_matrix_indices, summing_matrix_values, size)

This updates the code to avoid this.

Previously this code would raise the following:
```
linear_operator\utils\interpolation.py:71: UserWarning: torch.sparse.SparseTensor(indices, values, shape, *, device=) is deprecated.  Please use torch.sparse_coo_tensor(indices, values, shape, dtype=, device=). (Triggered internally at ..\torch\csrc\utils\tensor_new.cpp:620.)
  summing_matrix = cls(summing_matrix_indices, summing_matrix_values, size)
```

This updates the code to avoid this.
@Balandat Balandat merged commit dca438e into cornellius-gp:main Mar 12, 2025
6 checks passed
@Balandat Balandat deleted the fix_deprecated_sparse_tensor branch March 12, 2025 05:34
@pluflou pluflou mentioned this pull request May 22, 2025
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant