bert icon indicating copy to clipboard operation
bert copied to clipboard

Update tokenization.py

Open kopalsharma19 opened this issue 5 years ago • 4 comments

In function load_vocab(vocab_file) tf.gfile.Gfile throws an AttributeError: module 'tensorflow' has no attribute 'gfile'

I suppose in Tensorflow 2.0 and later versions the gfile has been moved to tf.io

hence replaced tf.gfile.Gfile with tf.io.gfile.Gfile

kopalsharma19 avatar Jul 03 '20 08:07 kopalsharma19

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

:memo: Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

googlebot avatar Jul 03 '20 08:07 googlebot

@googlebot I signed it!

kopalsharma19 avatar Jul 03 '20 08:07 kopalsharma19

CLAs look good, thanks!

ℹ️ Googlers: Go here for more info.

googlebot avatar Jul 03 '20 08:07 googlebot

I had a similar issue and had to update from tf.gfile to tf.io.gfile.

ghost avatar Jul 16 '24 01:07 ghost