File size: 2,750 Bytes
5657307
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
# Logging methods

🤗 Evaluate strives to be transparent and explicit about how it works, but this can be quite verbose at times. We have included a series of logging methods which allow you to easily adjust the level of verbosity of the entire library. Currently the default verbosity of the library is set to `WARNING`.

To change the level of verbosity, use one of the direct setters. For instance, here is how to change the verbosity to the `INFO` level:

```py
import evaluate
evaluate.logging.set_verbosity_info()
```

You can also use the environment variable `EVALUATE_VERBOSITY` to override the default verbosity, and set it to one of the following: `debug`, `info`, `warning`, `error`, `critical`:

```bash
EVALUATE_VERBOSITY=error ./myprogram.py
```

All the methods of this logging module are documented below. The main ones are:

- [`logging.get_verbosity`] to get the current level of verbosity in the logger
- [`logging.set_verbosity`] to set the verbosity to the level of your choice

In order from the least to the most verbose (with their corresponding `int` values):

1. `logging.CRITICAL` or `logging.FATAL` (int value, 50): only report the most critical errors.
2. `logging.ERROR` (int value, 40): only report errors.
3. `logging.WARNING` or `logging.WARN` (int value, 30): only reports error and warnings. This the default level used by the library.
4. `logging.INFO` (int value, 20): reports error, warnings and basic information.
5. `logging.DEBUG` (int value, 10): report all information.

By default, `tqdm` progress bars will be displayed during evaluate download and processing. [`logging.disable_progress_bar`] and [`logging.enable_progress_bar`] can be used to suppress or unsuppress this behavior. 

## Functions

[[autodoc]] evaluate.logging.get_verbosity

[[autodoc]] evaluate.logging.set_verbosity

[[autodoc]] evaluate.logging.set_verbosity_info

[[autodoc]] evaluate.logging.set_verbosity_warning

[[autodoc]] evaluate.logging.set_verbosity_debug

[[autodoc]] evaluate.logging.set_verbosity_error

[[autodoc]] evaluate.logging.disable_propagation

[[autodoc]] evaluate.logging.enable_propagation

[[autodoc]] evaluate.logging.get_logger

[[autodoc]] evaluate.logging.enable_progress_bar

[[autodoc]] evaluate.logging.disable_progress_bar

## Levels

### evaluate.logging.CRITICAL

evaluate.logging.CRITICAL = 50

### evaluate.logging.DEBUG

evaluate.logging.DEBUG = 10

### evaluate.logging.ERROR

evaluate.logging.ERROR = 40

### evaluate.logging.FATAL

evaluate.logging.FATAL = 50

### evaluate.logging.INFO

evaluate.logging.INFO = 20

### evaluate.logging.NOTSET

evaluate.logging.NOTSET = 0

### evaluate.logging.WARN

evaluate.logging.WARN = 30

### evaluate.logging.WARNING

evaluate.logging.WARNING = 30