mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-21 13:44:15 +08:00
Pull Request resolved: https://github.com/pytorch/pytorch/pull/112565 Approved by: https://github.com/Skylion007 ghstack dependencies: #112561, #112562, #112563, #112564
13 lines
292 B
Python
13 lines
292 B
Python
import dataclasses
|
|
|
|
from typing import Callable, Optional
|
|
|
|
from torch._guards import GuardsSet
|
|
from .types import GuardFail
|
|
|
|
|
|
@dataclasses.dataclass
|
|
class Hooks:
|
|
guard_export_fn: Optional[Callable[[GuardsSet], None]] = None
|
|
guard_fail_fn: Optional[Callable[[GuardFail], None]] = None
|