sync logging utils with transformers
MEMBER
Also, some downloads and dataset processing can be quite long for large datasets like wikipedia/pg19/etc. We probably don't want to user to think that the library is hanging. Happy to reorganize logging between DEBUG/INFO/WARNING to make it less verbose by default though.
2020-09-14T09:57:17Z
https://github.com/huggingface/datasets/pull/618#issuecomment-691950697
https://api.github.com/repos/huggingface/datasets/issues/618
MDEyOklzc3VlQ29tbWVudDY5MTk1MDY5Nw==
https://api.github.com/repos/huggingface/datasets/issues/comments/691950697/reactions
2020-09-14T09:57:17Z
https://api.github.com/repos/huggingface/datasets/issues/comments/691950697
https://avatars.githubusercontent.com/u/7353373?v=4
https://api.github.com/users/thomwolf/events{/privacy}
https://api.github.com/users/thomwolf/followers
https://api.github.com/users/thomwolf/following{/other_user}
https://api.github.com/users/thomwolf/gists{/gist_id}
https://github.com/thomwolf
thomwolf
MDQ6VXNlcjczNTMzNzM=
https://api.github.com/users/thomwolf/orgs
https://api.github.com/users/thomwolf/received_events
https://api.github.com/users/thomwolf/repos
https://api.github.com/users/thomwolf/starred{/owner}{/repo}
https://api.github.com/users/thomwolf/subscriptions
User
https://api.github.com/users/thomwolf
public
CONTRIBUTOR
The problem is that `transformers` imports `datasets` and the latter starts logging on `import`: at least 3 info messages - apache beam/torch/tf available - so it injects noise whether one uses the library or not - i.e. no choice given to the user.

Would you be open for me to changing this PR, to keep the initial level at INFO, but to keep the `DATASETS_VERBOSITY` env var it introduces, to let the user control the verbosity?


2020-09-14T16:28:14Z
https://github.com/huggingface/datasets/pull/618#issuecomment-692168873
https://api.github.com/repos/huggingface/datasets/issues/618
MDEyOklzc3VlQ29tbWVudDY5MjE2ODg3Mw==
https://api.github.com/repos/huggingface/datasets/issues/comments/692168873/reactions
2020-09-14T16:28:48Z
https://api.github.com/repos/huggingface/datasets/issues/comments/692168873
https://avatars.githubusercontent.com/u/10676103?v=4
https://api.github.com/users/stas00/events{/privacy}
https://api.github.com/users/stas00/followers
https://api.github.com/users/stas00/following{/other_user}
https://api.github.com/users/stas00/gists{/gist_id}
https://github.com/stas00
stas00
MDQ6VXNlcjEwNjc2MTAz
https://api.github.com/users/stas00/orgs
https://api.github.com/users/stas00/received_events
https://api.github.com/users/stas00/repos
https://api.github.com/users/stas00/starred{/owner}{/repo}
https://api.github.com/users/stas00/subscriptions
User
https://api.github.com/users/stas00
public
CONTRIBUTOR
> Also, some downloads and dataset processing can be quite long for large datasets like wikipedia/pg19/etc. We probably don't want to user to think that the library is hanging.

If you're referring to tqdm progress reports, it's not affected by changing the logging levels. It's not using logging.
2020-09-14T16:29:22Z
https://github.com/huggingface/datasets/pull/618#issuecomment-692169480
https://api.github.com/repos/huggingface/datasets/issues/618
MDEyOklzc3VlQ29tbWVudDY5MjE2OTQ4MA==
https://api.github.com/repos/huggingface/datasets/issues/comments/692169480/reactions
2020-09-14T16:29:43Z
https://api.github.com/repos/huggingface/datasets/issues/comments/692169480
https://avatars.githubusercontent.com/u/10676103?v=4
https://api.github.com/users/stas00/events{/privacy}
https://api.github.com/users/stas00/followers
https://api.github.com/users/stas00/following{/other_user}
https://api.github.com/users/stas00/gists{/gist_id}
https://github.com/stas00
stas00
MDQ6VXNlcjEwNjc2MTAz
https://api.github.com/users/stas00/orgs
https://api.github.com/users/stas00/received_events
https://api.github.com/users/stas00/repos
https://api.github.com/users/stas00/starred{/owner}{/repo}
https://api.github.com/users/stas00/subscriptions
User
https://api.github.com/users/stas00
public
MEMBER
> The problem is that `transformers` imports `datasets` and the latter starts logging on `import`: at least 3 info messages - apache beam/torch/tf available - so it injects noise whether one uses the library or not - i.e. no choice given to the user.
> 
> Would you be open for me to changing this PR, to keep the initial level at INFO, but to keep the `DATASETS_VERBOSITY` env var it introduces, to let the user control the verbosity?

For now we can do that, then I'll change some messages to warnings and set the default verbosity at warning as well at that point. Does it sound good to you ?

> If you're referring to tqdm progress reports, it's not affected by changing the logging levels. It's not using logging.

Actually we configured some progress bars to be disabled depending on the logging level ^^'

2020-09-14T16:43:09Z
https://github.com/huggingface/datasets/pull/618#issuecomment-692176694
https://api.github.com/repos/huggingface/datasets/issues/618
MDEyOklzc3VlQ29tbWVudDY5MjE3NjY5NA==
https://api.github.com/repos/huggingface/datasets/issues/comments/692176694/reactions
2020-09-14T16:43:09Z
https://api.github.com/repos/huggingface/datasets/issues/comments/692176694
https://avatars.githubusercontent.com/u/42851186?v=4
https://api.github.com/users/lhoestq/events{/privacy}
https://api.github.com/users/lhoestq/followers
https://api.github.com/users/lhoestq/following{/other_user}
https://api.github.com/users/lhoestq/gists{/gist_id}
https://github.com/lhoestq
lhoestq
MDQ6VXNlcjQyODUxMTg2
https://api.github.com/users/lhoestq/orgs
https://api.github.com/users/lhoestq/received_events
https://api.github.com/users/lhoestq/repos
https://api.github.com/users/lhoestq/starred{/owner}{/repo}
https://api.github.com/users/lhoestq/subscriptions
User
https://api.github.com/users/lhoestq
public
CONTRIBUTOR
> For now we can do that, then I'll change some messages to warnings and set the default verbosity at warning as well at that point. Does it sound good to you ?

If it is logical then by all means. 

> > If you're referring to tqdm progress reports, it's not affected by changing the logging levels. It's not using logging.
> 
> Actually we configured some progress bars to be disabled depending on the logging level ^^'

This is very smart!

I reverted s/WARNINGS/INFO/.

Thank you!
2020-09-14T16:48:50Z
https://github.com/huggingface/datasets/pull/618#issuecomment-692179929
https://api.github.com/repos/huggingface/datasets/issues/618
MDEyOklzc3VlQ29tbWVudDY5MjE3OTkyOQ==
https://api.github.com/repos/huggingface/datasets/issues/comments/692179929/reactions
2020-09-14T16:48:50Z
https://api.github.com/repos/huggingface/datasets/issues/comments/692179929
https://avatars.githubusercontent.com/u/10676103?v=4
https://api.github.com/users/stas00/events{/privacy}
https://api.github.com/users/stas00/followers
https://api.github.com/users/stas00/following{/other_user}
https://api.github.com/users/stas00/gists{/gist_id}
https://github.com/stas00
stas00
MDQ6VXNlcjEwNjc2MTAz
https://api.github.com/users/stas00/orgs
https://api.github.com/users/stas00/received_events
https://api.github.com/users/stas00/repos
https://api.github.com/users/stas00/starred{/owner}{/repo}
https://api.github.com/users/stas00/subscriptions
User
https://api.github.com/users/stas00
public
MEMBER
Note that it’s the same in `transformers` @stas00, tdqm are also controlled by the logging level there.
2020-09-14T17:58:42Z
https://github.com/huggingface/datasets/pull/618#issuecomment-692217519
https://api.github.com/repos/huggingface/datasets/issues/618
MDEyOklzc3VlQ29tbWVudDY5MjIxNzUxOQ==
https://api.github.com/repos/huggingface/datasets/issues/comments/692217519/reactions
2020-09-14T17:58:42Z
https://api.github.com/repos/huggingface/datasets/issues/comments/692217519
https://avatars.githubusercontent.com/u/7353373?v=4
https://api.github.com/users/thomwolf/events{/privacy}
https://api.github.com/users/thomwolf/followers
https://api.github.com/users/thomwolf/following{/other_user}
https://api.github.com/users/thomwolf/gists{/gist_id}
https://github.com/thomwolf
thomwolf
MDQ6VXNlcjczNTMzNzM=
https://api.github.com/users/thomwolf/orgs
https://api.github.com/users/thomwolf/received_events
https://api.github.com/users/thomwolf/repos
https://api.github.com/users/thomwolf/starred{/owner}{/repo}
https://api.github.com/users/thomwolf/subscriptions
User
https://api.github.com/users/thomwolf
public
CONTRIBUTOR
> Note that it’s the same in `transformers` @stas00, tdqm are also controlled by the logging level there.

That's good to know, @thomwolf - thank you!

I see that it's controlled in `trainer.py`, but in `examples` it's not - since that's where I usually see the progressbars (and they are great!). But I suppose they aren't API, so `examples` can behave differently.
2020-09-14T18:11:51Z
https://github.com/huggingface/datasets/pull/618#issuecomment-692224471
https://api.github.com/repos/huggingface/datasets/issues/618
MDEyOklzc3VlQ29tbWVudDY5MjIyNDQ3MQ==
https://api.github.com/repos/huggingface/datasets/issues/comments/692224471/reactions
2020-09-14T18:11:51Z
https://api.github.com/repos/huggingface/datasets/issues/comments/692224471
https://avatars.githubusercontent.com/u/10676103?v=4
https://api.github.com/users/stas00/events{/privacy}
https://api.github.com/users/stas00/followers
https://api.github.com/users/stas00/following{/other_user}
https://api.github.com/users/stas00/gists{/gist_id}
https://github.com/stas00
stas00
MDQ6VXNlcjEwNjc2MTAz
https://api.github.com/users/stas00/orgs
https://api.github.com/users/stas00/received_events
https://api.github.com/users/stas00/repos
https://api.github.com/users/stas00/starred{/owner}{/repo}
https://api.github.com/users/stas00/subscriptions
User
https://api.github.com/users/stas00
public
CONTRIBUTOR
BTW, this is what I'm talking about:
```
python -c "import transformers"
2020-09-14 21:00:58.032658: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcudart.so.10.1
PyTorch version 1.7.0.dev20200910 available.
TensorFlow version 2.3.0 available.
Apache Beam available.
```
why does the user need to see this? Especially, if they aren't even using `datasets` directly?
2020-09-15T04:02:26Z
https://github.com/huggingface/datasets/pull/618#issuecomment-692449158
https://api.github.com/repos/huggingface/datasets/issues/618
MDEyOklzc3VlQ29tbWVudDY5MjQ0OTE1OA==
https://api.github.com/repos/huggingface/datasets/issues/comments/692449158/reactions
2020-09-15T04:02:26Z
https://api.github.com/repos/huggingface/datasets/issues/comments/692449158
https://avatars.githubusercontent.com/u/10676103?v=4
https://api.github.com/users/stas00/events{/privacy}
https://api.github.com/users/stas00/followers
https://api.github.com/users/stas00/following{/other_user}
https://api.github.com/users/stas00/gists{/gist_id}
https://github.com/stas00
stas00
MDQ6VXNlcjEwNjc2MTAz
https://api.github.com/users/stas00/orgs
https://api.github.com/users/stas00/received_events
https://api.github.com/users/stas00/repos
https://api.github.com/users/stas00/starred{/owner}{/repo}
https://api.github.com/users/stas00/subscriptions
User
https://api.github.com/users/stas00
public
MEMBER
Yes you are right, we should re-think the logging level of various elements.
I also think that the `set_format` messages are confusing when they are the results of our internal operations (as mentioned [here](https://discuss.huggingface.co/t/pipeline-with-custom-dataset-tokenizer-when-to-save-load-manually/1084/7?u=thomwolf))
2020-09-15T07:08:28Z
https://github.com/huggingface/datasets/pull/618#issuecomment-692513969
https://api.github.com/repos/huggingface/datasets/issues/618
MDEyOklzc3VlQ29tbWVudDY5MjUxMzk2OQ==
https://api.github.com/repos/huggingface/datasets/issues/comments/692513969/reactions
2020-09-15T07:08:28Z
https://api.github.com/repos/huggingface/datasets/issues/comments/692513969
https://avatars.githubusercontent.com/u/7353373?v=4
https://api.github.com/users/thomwolf/events{/privacy}
https://api.github.com/users/thomwolf/followers
https://api.github.com/users/thomwolf/following{/other_user}
https://api.github.com/users/thomwolf/gists{/gist_id}
https://github.com/thomwolf
thomwolf
MDQ6VXNlcjczNTMzNzM=
https://api.github.com/users/thomwolf/orgs
https://api.github.com/users/thomwolf/received_events
https://api.github.com/users/thomwolf/repos
https://api.github.com/users/thomwolf/starred{/owner}{/repo}
https://api.github.com/users/thomwolf/subscriptions
User
https://api.github.com/users/thomwolf
public
MEMBER
Actually I continued this PR in #635 to set the level to warning and update the logging level of some messages.

Let me know if it sounds good to you
2020-09-16T15:42:20Z
https://github.com/huggingface/datasets/pull/618#issuecomment-693491536
https://api.github.com/repos/huggingface/datasets/issues/618
MDEyOklzc3VlQ29tbWVudDY5MzQ5MTUzNg==
https://api.github.com/repos/huggingface/datasets/issues/comments/693491536/reactions
2020-09-16T15:42:20Z
https://api.github.com/repos/huggingface/datasets/issues/comments/693491536
https://avatars.githubusercontent.com/u/42851186?v=4
https://api.github.com/users/lhoestq/events{/privacy}
https://api.github.com/users/lhoestq/followers
https://api.github.com/users/lhoestq/following{/other_user}
https://api.github.com/users/lhoestq/gists{/gist_id}
https://github.com/lhoestq
lhoestq
MDQ6VXNlcjQyODUxMTg2
https://api.github.com/users/lhoestq/orgs
https://api.github.com/users/lhoestq/received_events
https://api.github.com/users/lhoestq/repos
https://api.github.com/users/lhoestq/starred{/owner}{/repo}
https://api.github.com/users/lhoestq/subscriptions
User
https://api.github.com/users/lhoestq
public
MEMBER
Closing this one sice #635 got merged
2020-09-17T09:53:47Z
https://github.com/huggingface/datasets/pull/618#issuecomment-694126492
https://api.github.com/repos/huggingface/datasets/issues/618
MDEyOklzc3VlQ29tbWVudDY5NDEyNjQ5Mg==
https://api.github.com/repos/huggingface/datasets/issues/comments/694126492/reactions
2020-09-17T09:53:47Z
https://api.github.com/repos/huggingface/datasets/issues/comments/694126492
https://avatars.githubusercontent.com/u/42851186?v=4
https://api.github.com/users/lhoestq/events{/privacy}
https://api.github.com/users/lhoestq/followers
https://api.github.com/users/lhoestq/following{/other_user}
https://api.github.com/users/lhoestq/gists{/gist_id}
https://github.com/lhoestq
lhoestq
MDQ6VXNlcjQyODUxMTg2
https://api.github.com/users/lhoestq/orgs
https://api.github.com/users/lhoestq/received_events
https://api.github.com/users/lhoestq/repos
https://api.github.com/users/lhoestq/starred{/owner}{/repo}
https://api.github.com/users/lhoestq/subscriptions
User
https://api.github.com/users/lhoestq
public
CONTRIBUTOR
Awesome! Thank you!

Any ideas how to eliminate this remaining log line from tensorflow (I know it's not `datasets` related, but perhaps you know).
```
python -c "import transformers"
2020-09-17 08:38:34.718410: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcudart.so.10.1
```
2020-09-17T15:40:03Z
https://github.com/huggingface/datasets/pull/618#issuecomment-694319918
https://api.github.com/repos/huggingface/datasets/issues/618
MDEyOklzc3VlQ29tbWVudDY5NDMxOTkxOA==
https://api.github.com/repos/huggingface/datasets/issues/comments/694319918/reactions
2020-09-17T15:40:59Z
https://api.github.com/repos/huggingface/datasets/issues/comments/694319918
https://avatars.githubusercontent.com/u/10676103?v=4
https://api.github.com/users/stas00/events{/privacy}
https://api.github.com/users/stas00/followers
https://api.github.com/users/stas00/following{/other_user}
https://api.github.com/users/stas00/gists{/gist_id}
https://github.com/stas00
stas00
MDQ6VXNlcjEwNjc2MTAz
https://api.github.com/users/stas00/orgs
https://api.github.com/users/stas00/received_events
https://api.github.com/users/stas00/repos
https://api.github.com/users/stas00/starred{/owner}{/repo}
https://api.github.com/users/stas00/subscriptions
User
https://api.github.com/users/stas00
public
sync the docs/code with the recent changes in transformers' `logging` utils:
1. change the default level to `WARNING`
2. add `DATASETS_VERBOSITY` env var
3. expand docs