mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-06 12:20:52 +01:00
[Easy][pytree] enable CXX pytree under torch::deploy (#130144)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/130144 Approved by: https://github.com/zou3519 ghstack dependencies: #130895, #130139
This commit is contained in:
parent
ddde9dd25c
commit
1439bd3c9c
|
|
@ -29,11 +29,6 @@ from typing import (
|
|||
)
|
||||
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
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user