huggingface / transformers

🤗 Transformers: State-of-the-art Machine Learning for Pytorch, TensorFlow, and JAX.
https://huggingface.co/transformers
Apache License 2.0
132.51k stars 26.4k forks source link

bert:What is the tf version corresponding to tensformers? #13331

Closed xmcs111 closed 3 years ago

xmcs111 commented 3 years ago

I use python3.7, tf2.4.0, cuda11.1 and cudnn 8.0.4 to run bert-base-un and report an error

xmcs111 commented 3 years ago

@Rocketknight1

LysandreJik commented 3 years ago

Hello! Do you mind providing the error you're seeing? Thank you!

xmcs111 commented 3 years ago

''' I:?[35mVENTILATOR?[0m:freeze, optimize and export graph, could take a while... 2021-08-30 20:07:49.360788: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cudart64_110.dll d:\users...\pycharmprojects\machine learning i don't study\venv37\lib\site-packages\bert_serving\server\helper.py:176: UserWarning: Tensorflow 2.4.0 is not tested! It may or may not work. Feel free to submit an issue at https://github.com/hanxiao/bert-as-service/issues/ 'Feel free to submit an issue at https://github.com/hanxiao/bert-as-service/issues/' % tf.version) E:?[36mGRAPHOPT?[0m:fail to optimize the graph! Traceback (most recent call last): File "D:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\lib\runpy.py", line 193, in _run_module_as_main "main", mod_spec) File "D:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\lib\runpy.py", line 85, in _run_code exec(code, run_globals) File "D:\Users...\PycharmProjects\machine learning I don't study\venv37\Scripts\bert-serving-start.exe__main.py", line 7, in File "d:\users...\pycharmprojects\machine learning i don't study\venv37\lib\site-packages\bert_serving\server\cli__init__.py", line 4, in main with BertServer(get_run_args()) as server: File "d:\users...\pycharmprojects\machine learning i don't study\venv37\lib\site-packages\bert_serving\server\init.py", line 71, in init__ self.graph_path, self.bert_config = pool.apply(optimize_graph, (self.args,)) TypeError: cannot unpack non-iterable NoneType object '''

Rocketknight1 commented 3 years ago

Hi, it seems like you're using bert-as-service with an unsupported version of Tensorflow. That isn't a Huggingface project, so we can't really support it here, unfortunately! Try filing an issue at that repo instead!

If you're interested in learning to use the Transformers library, you can check out our documentation, our course or our example code, but we can't really answer questions on any of that in GitHub issues - try the forums instead!

I'm going to close this issue, but if you believe there's an actual problem in the Transformers library, separate from bert-as-service, please feel free to add more info and re-open it.