google-research / albert

ALBERT: A Lite BERT for Self-supervised Learning of Language Representations
Apache License 2.0
3.24k stars 569 forks source link

`run_classifier_with_tfhub.py` is missing. #60

Closed bobloki closed 4 years ago

bobloki commented 4 years ago

In the readme there is a mention to a file "run_classifier_with_tfhub.py" but there is no file in this github repository with that name.

For a full example, see run_classifier_with_tfhub.py.

bobloki commented 4 years ago

There are mentions to this python file in many places including on Tensorflow Hub.

https://tfhub.dev/google/albert_xlarge/2 says go to

https://github.com/google-research/google-research/blob/master/albert/run_classifier_with_tfhub.py

rickwierenga commented 4 years ago

I'm having the same issue.

Here is a similar file, but for full BERT: https://github.com/google-research/bert/blob/master/run_classifier_with_tfhub.py. I haven't been able to figure out how to use code with ALBERT, but it might be possible.

rickwierenga commented 4 years ago

Found it! It was hidden in an old commit.

0x0539 commented 4 years ago

The run_classifier_with_tfhub.py script was merged into run_classifier.py because it became out of sync with run_classifier.py at some point, which resulted in performance problems. I don't recommend using that old commit because you will likely not get good performance.

The documentation fell out of date, but I'm working on fixing that up now. Thanks for letting us know :)

tl;dr Please use the run_classifier.py script with the --albert_hub_module_handle flag. That is the recommended way to run GLUE tasks starting from TF-Hub.

0x0539 commented 4 years ago

BTW, here is the commit where the two scripts were merged: https://github.com/google-research/ALBERT/commit/941051a5c8ef2274fe7bc698b0aac94e281db2e7