mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
Reland PR: - #112109 Pull Request resolved: https://github.com/pytorch/pytorch/pull/112268 Approved by: https://github.com/Skylion007
23 lines
672 B
Python
23 lines
672 B
Python
# Copyright (c) Facebook, Inc. and its affiliates.
|
|
# All rights reserved.
|
|
#
|
|
# This source code is licensed under the BSD-style license found in the
|
|
# LICENSE file in the root directory of this source tree.
|
|
|
|
import warnings
|
|
|
|
# TODO: remove this file when the migration of the pytree utility is done
|
|
from torch.utils._pytree import tree_map_, treespec_pprint
|
|
|
|
|
|
__all__ = ["tree_map_", "treespec_pprint"]
|
|
|
|
|
|
with warnings.catch_warnings():
|
|
warnings.simplefilter("always")
|
|
warnings.warn(
|
|
"torch._functorch.pytree_hacks is deprecated and will be removed in a future release. "
|
|
"Please use torch.utils._pytree instead.",
|
|
DeprecationWarning,
|
|
)
|