PAIR-code / lit

The Learning Interpretability Tool: Interactively analyze ML models to understand their behavior in an extensible and framework agnostic interface.
https://pair-code.github.io/lit
Apache License 2.0
3.47k stars 352 forks source link

TypeError: cached_path() got an unexpected keyword argument 'extract_compressed_file' #179

Open chaowu2009 opened 3 years ago

chaowu2009 commented 3 years ago

python -m lit_nlp.examples.glue_demo --port=5432 --quickstart give the following error:

I0113 20:59:53.176898 4700048832 glue_demo.py:86] Quick-start mode; overriding --models and --max_examples. I0113 20:59:53.177102 4700048832 glue_demo.py:96] Loading model 'sst2-tiny' for task 'sst2' from 'https://storage.googleapis.com/what-if-tool-resources/lit-models/sst2_tiny.tar.gz' Traceback (most recent call last): File "/Users/chaowu/Documents/Anaconda/anaconda3/lib/python3.8/runpy.py", line 194, in _run_module_as_main return _run_code(code, main_globals, None, File "/Users/chaowu/Documents/Anaconda/anaconda3/lib/python3.8/runpy.py", line 87, in _run_code exec(code, run_globals) File "/Users/chaowu/Documents/Anaconda/anaconda3/lib/python3.8/site-packages/lit_nlp/examples/glue_demo.py", line 133, in app.run(main) File "/Users/chaowu/Documents/Anaconda/anaconda3/lib/python3.8/site-packages/absl/app.py", line 300, in run _run_main(main, args) File "/Users/chaowu/Documents/Anaconda/anaconda3/lib/python3.8/site-packages/absl/app.py", line 251, in _run_main sys.exit(main(argv)) File "/Users/chaowu/Documents/Anaconda/anaconda3/lib/python3.8/site-packages/lit_nlp/examples/glue_demo.py", line 100, in main path = transformers.file_utils.cached_path( TypeError: cached_path() got an unexpected keyword argument 'extract_compressed_file'

jameswex commented 3 years ago

Thanks for the report. What version of the transformers library do you have installed in your environment?

The code on our main branch (and in our 0.2 pip package) requires transformers==2.11.0, but soon we will cut a new release from our dev branch which is updated to use version 4.1.1