Skip to content

Commit

Permalink
[Easy][pytree] enable CXX pytree under torch::deploy (#130144)
Browse files Browse the repository at this point in the history
Pull Request resolved: #130144
Approved by: https://github.com/zou3519
ghstack dependencies: #130895, #130139
  • Loading branch information
XuehaiPan authored and pytorchmergebot committed Jul 21, 2024
1 parent ddde9dd commit 1439bd3
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions torch/utils/_cxx_pytree.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,6 @@
)
from typing_extensions import deprecated

import torch

if torch._running_with_deploy(): # type: ignore[no-untyped-call]
raise ImportError("C++ pytree utilities do not work with torch::deploy.")

import optree
from optree import PyTreeSpec # direct import for type annotations

Expand Down

0 comments on commit 1439bd3

Please sign in to comment.