text: 
  
  TITLE
  [examples] replicate the new `--log_level` feature to all trainer-based pytorch examples
  
  COMMENTS
  7
  
  REACTIONS
  +1: 0
  -1: 0
  laugh: 0
  hooray: 0
  heart: 0
  rocket: 0
  eyes: 0
  
  BODY
  https://github.com/huggingface/transformers/pull/12276 introduced a new `--log_level` feature, which now allows users to set their desired log level via CLI or TrainingArguments. 
  
  `run_translation.py` was used as a "model" for other examples.
  
  Now we need to replicate this to all other Trainer-based examples under examples/pytorch/, the 3 changes are
  1. importing datasets
  2. using `training_args.get_node_log_level()`  and setting log_level in 3 modules
  3. replacing `datasets` object name with `raw_datasets`, since otherwise we have a conflict with `datasets` the module.
  
  and the relevant diff is [here](https://github.com/huggingface/transformers/pull/12276/files?file-filters%5B%5D=.py#diff-09777f56cee1060a535a72ce99a6c96cdb7f330c8cc3f9dcca442b3f7768237a)
  
  and of course since we don't quite have extensive tests for examples, you can just test with a staple cmd from the corresponding README.md with `--log_level=error` and check that almost all logs are gone.
  
  This is open to all.
  
  And thank you.