__init__.py 738 B

12345678910111213141516
  1. # Top level logging module for torch logging
  2. # Design doc: https://docs.google.com/document/d/1ZRfTWKa8eaPq1AxaiHrq4ASTPouzzlPiuquSBEJYwS8/edit#
  3. # Simple setup for onboarding (see above doc for more detail):
  4. # 1. register any top-level log qualified name for your module in torch._logging._registrations (see there for examples)
  5. # 2. register any artifacts (<artifact_name> below) in torch._logging._registrations
  6. # a. call getArtifactLogger(__name__, <artifact_name>) at your logging site instead of the standard logger to log your artifact
  7. import torch._logging._registrations
  8. from ._internal import (
  9. _init_logs,
  10. DEFAULT_LOGGING,
  11. getArtifactLogger,
  12. LazyString,
  13. set_logs,
  14. trace_structured,
  15. warning_once,
  16. )