kpe / bert-for-tf2

A Keras TensorFlow 2.0 implementation of BERT, ALBERT and adapter-BERT.
https://github.com/kpe/bert-for-tf2
MIT License
803 stars 193 forks source link

Verbose mode #69

Closed AndreFWeber closed 4 years ago

AndreFWeber commented 4 years ago

I am using it in my project and it works flawlessly. The thing is that I happen to call my python script from a PHP script and listen to the stdout for debugging purposes. I noticed that there are some prints in your code that my PHP script is reading.

With that said, would you consider adding a verbose flag on your code, please?

for example, I am receiving the output of these prints, from loader.py:

print("Done loading {} BERT weights from: {} into {} (prefix:{}). "
      "Count of weights not found in the checkpoint was: [{}]. "
      "Count of weights with mismatched shape: [{}]".format(
          len(weight_value_tuples), ckpt_path, bert, prefix, skip_count, len(skipped_weight_value_tuples)))

print("Unused weights from checkpoint:",
      "\n\t" + "\n\t".join(sorted(stock_weights.difference(loaded_weights))))
kpe commented 4 years ago

@AndreFWeber - sorry, for the late reply. Would an env variable work for you?

AndreFWeber commented 4 years ago

Yes, it would work as well. Thanks, I appreciate it.