pytorch/torch/_logging/__init__.py
Edward Z. Yang 5d3c347bf6 Make split reduction warning only emit once (#97112)
Signed-off-by: Edward Z. Yang <ezyang@meta.com>

Pull Request resolved: https://github.com/pytorch/pytorch/pull/97112
Approved by: https://github.com/Skylion007
2023-03-21 14:57:31 +00:00

9 lines
658 B
Python

# Top level logging module for torch logging
# Design doc: https://docs.google.com/document/d/1ZRfTWKa8eaPq1AxaiHrq4ASTPouzzlPiuquSBEJYwS8/edit#
# Simple setup for onboarding (see above doc for more detail):
# 1. register any top-level log qualified name for your module in torch._logging._registrations (see there for examples)
# 2. register any artifacts (<artifact_name> below) in torch._logging._registrations
# a. call getArtifactLogger(__name__, <artifact_name>) at your logging site instead of the standard logger to log your artifact
import torch._logging._registrations
from ._internal import _init_logs, getArtifactLogger, set_logs, warning_once