From 6a606436669c7e0492ceaf3b448e827a22384a64 Mon Sep 17 00:00:00 2001 From: Lysandre Date: Wed, 11 Oct 2023 17:04:58 +0200 Subject: [PATCH] More comprehensive documentation --- docs/source/en/main_classes/logging.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/source/en/main_classes/logging.md b/docs/source/en/main_classes/logging.md index 97076ca39e9b3..6a77001608c91 100644 --- a/docs/source/en/main_classes/logging.md +++ b/docs/source/en/main_classes/logging.md @@ -80,6 +80,10 @@ that has already been deprecated and `DeprecationWarning` to indicate an upcomin We use both in the `transformers` library. We leverage and adapt `logging`'s `captureWarning` method to allow management of these warning messages by the verbosity setters above. +What does that mean for developers of the library? We should respect the following heuristic: +- `warnings` should be favored for developers of the library and libraries dependent on `transformers` +- `logging` should be used for end-users of the library using it in every-day projects + See reference of the `captureWarnings` method below. [[autodoc]] logging.captureWarnings