Pedro Cuenca commited on
Commit
d9f5a35
1 Parent(s): de74f11

use pylogging to refer to logging.

Browse files

transformers.utils.logging somehow made it into the global namespace.

Files changed (1) hide show
  1. seq2seq/run_seq2seq_flax.py +3 -3
seq2seq/run_seq2seq_flax.py CHANGED
@@ -361,13 +361,13 @@ def main():
361
  )
362
 
363
  # Make one log on every process with the configuration for debugging.
364
- logging.basicConfig(
365
  format="%(asctime)s - %(levelname)s - %(name)s - %(message)s",
366
  datefmt="%m/%d/%Y %H:%M:%S",
367
- level=logging.INFO,
368
  )
369
  # Setup logging, we only want one process per machine to log things on the screen.
370
- logger.setLevel(logging.INFO if jax.process_index() == 0 else logging.ERROR)
371
  if jax.process_index() == 0:
372
  datasets.utils.logging.set_verbosity_warning()
373
  transformers.utils.logging.set_verbosity_info()
 
361
  )
362
 
363
  # Make one log on every process with the configuration for debugging.
364
+ pylogging.basicConfig(
365
  format="%(asctime)s - %(levelname)s - %(name)s - %(message)s",
366
  datefmt="%m/%d/%Y %H:%M:%S",
367
+ level=pylogging.INFO,
368
  )
369
  # Setup logging, we only want one process per machine to log things on the screen.
370
+ logger.setLevel(pylogging.INFO if jax.process_index() == 0 else pylogging.ERROR)
371
  if jax.process_index() == 0:
372
  datasets.utils.logging.set_verbosity_warning()
373
  transformers.utils.logging.set_verbosity_info()