mlcommons / training

Reference implementations of MLPerf™ training benchmarks
https://mlcommons.org/en/groups/training
Apache License 2.0
1.57k stars 548 forks source link

Improve TensorFlow compatibility in BERT scripts #743

Open rapsealk opened 3 weeks ago

rapsealk commented 3 weeks ago

Hello mlcommons team!

Trying to run training/language_model/tensorflow/bert/cleanup_scripts/create_pretraining_data.py with TensorFlow 1.15.4 and Python 3.6.9, I faced several warnings as below:

image

I'm not sure which TensorFlow version is recommended to run this script, but these changes will be helpful for future migration to TensorFlow 2.x.

Before After
tf.app.run() tf.compat.v1.app.run()
tf.logging.set_verbosity() tf.compat.v1.logging.set_verbosity()
tf.logging.INFO tf.compat.v1.logging.INFO
tf.gfile.GFile tf.io.gfile.GFile
tf.gfile.Glob tf.io.gfile.glob
tf.logging.info() tf.compat.v1.logging.info()

Refs

github-actions[bot] commented 3 weeks ago

MLCommons CLA bot All contributors have signed the MLCommons CLA ✍️ ✅

rapsealk commented 3 weeks ago

recheck

rapsealk commented 3 weeks ago

recheck

arjunsuresh commented 1 week ago

This PR was doing a similar change. For the PR to be merged I think we need to bring it up in the Training WG meeting - Thursdays 8:30AM PST.