Skip to content

Commit 5ccd38c

Browse files
committed
fix issue
1 parent 78b99c3 commit 5ccd38c

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

onnx_diagnostic/torch_export_patches/patches/patch_torch.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import inspect
22
import os
33
import traceback
4-
import warnings
54
from typing import Any, Callable, Dict, List, Sequence, Tuple, Union
65
import torch
76
from torch._subclasses.fake_tensor import FakeTensorMode
@@ -360,11 +359,12 @@ def _log_guard(
360359
self, prefix: str, g: "SympyBoolean", forcing_spec: bool # noqa: F821
361360
) -> None:
362361
self._log_guard_remember(prefix=prefix, g=g, forcing_spec=forcing_spec)
363-
sloc, _maybe_extra_debug = self._get_stack_summary(True)
364-
warnings.warn(
365-
f"A guard was added, prefix={prefix!r}, g={g!r}, "
366-
f"forcing_spec={forcing_spec}, location=\n{sloc}\n"
367-
f"--stack trace--\n{retrieve_stacktrace()}",
368-
RuntimeWarning,
369-
stacklevel=0,
370-
)
362+
# It happens too often to be relevant.
363+
# sloc, _maybe_extra_debug = self._get_stack_summary(True)
364+
# warnings.warn(
365+
# f"A guard was added, prefix={prefix!r}, g={g!r}, "
366+
# f"forcing_spec={forcing_spec}, location=\n{sloc}\n"
367+
# f"--stack trace--\n{retrieve_stacktrace()}",
368+
# RuntimeWarning,
369+
# stacklevel=0,
370+
# )

0 commit comments

Comments
 (0)