mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
Add functions from torch.masked._ops
to __all__
for torch.masked
(#131288)
Add the non-private operations imported in this file to `__all__` so that pyright considers them to be publicly exported. Solves this error: ``` "mean" is not exported from module "torch.masked" Pylance[reportPrivateImportUsage] ``` Related: https://github.com/pytorch/pytorch/pulls?q=pyright+export Pull Request resolved: https://github.com/pytorch/pytorch/pull/131288 Approved by: https://github.com/ezyang
This commit is contained in:
committed by
PyTorch MergeBot
parent
928adb7cc2
commit
7a779b5257
@ -476,6 +476,31 @@
|
||||
"vecdot",
|
||||
"vector_norm"
|
||||
],
|
||||
"torch.masked": [
|
||||
"amax",
|
||||
"amin",
|
||||
"argmax",
|
||||
"argmin",
|
||||
"as_masked_tensor",
|
||||
"cumprod",
|
||||
"cumsum",
|
||||
"is_masked_tensor",
|
||||
"log_softmax",
|
||||
"logaddexp",
|
||||
"logsumexp",
|
||||
"masked_tensor",
|
||||
"MaskedTensor",
|
||||
"mean",
|
||||
"median",
|
||||
"norm",
|
||||
"normalize",
|
||||
"prod",
|
||||
"softmax",
|
||||
"softmin",
|
||||
"std",
|
||||
"sum",
|
||||
"var"
|
||||
],
|
||||
"torch.multiprocessing": [
|
||||
"Array",
|
||||
"AuthenticationError",
|
||||
|
@ -31,8 +31,27 @@ from torch.masked.maskedtensor.creation import as_masked_tensor, masked_tensor
|
||||
|
||||
|
||||
__all__ = [
|
||||
"amax",
|
||||
"amin",
|
||||
"argmax",
|
||||
"argmin",
|
||||
"as_masked_tensor",
|
||||
"cumprod",
|
||||
"cumsum",
|
||||
"is_masked_tensor",
|
||||
"log_softmax",
|
||||
"logaddexp",
|
||||
"logsumexp",
|
||||
"masked_tensor",
|
||||
"MaskedTensor",
|
||||
"mean",
|
||||
"median",
|
||||
"norm",
|
||||
"normalize",
|
||||
"prod",
|
||||
"softmax",
|
||||
"softmin",
|
||||
"std",
|
||||
"sum",
|
||||
"var",
|
||||
]
|
||||
|
Reference in New Issue
Block a user