mirror of
https://github.com/pytorch/pytorch.git
synced 2026-10-25 18:53:39 +08:00
Introduces torch._custom_class_base with CustomClassBase and CustomClassBaseMeta as the new canonical base classes. The old torch._opaque_base module becomes a backward-compat shim that re-exports with DeprecationWarning. Updates all import sites across dynamo, functorch, inductor, export, distributed, and tests to use the new names. Pull Request resolved: https://github.com/pytorch/pytorch/pull/188455 Approved by: https://github.com/zou3519
12 lines
272 B
Python
12 lines
272 B
Python
import logging
|
|
|
|
|
|
log = logging.getLogger(__name__)
|
|
|
|
log.warning("torch._opaque_base is deprecated, use torch._custom_class_base instead")
|
|
|
|
from torch._custom_class_base import ( # noqa: F401
|
|
CustomClassBase as OpaqueBase,
|
|
CustomClassBaseMeta as OpaqueBaseMeta,
|
|
)
|