mirror of
https://github.com/pytorch/pytorch.git
synced 2025-11-06 09:17:11 +08:00
See https://github.com/pytorch/pytorch/pull/129751#issue-2380881501. Most changes are auto-generated by linter. You can review these PRs via: ```bash git diff --ignore-all-space --ignore-blank-lines HEAD~1 ``` Pull Request resolved: https://github.com/pytorch/pytorch/pull/129767 Approved by: https://github.com/anijain2305
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
|