robinjia / adversarial-squad

Code from Jia and Liang, "Adversarial Examples for Evaluating Reading Comprehension Systems" (EMNLP 2017)
MIT License
120 stars 26 forks source link

Facing some version issues #7

Closed naveenjafer closed 4 years ago

naveenjafer commented 4 years ago

Hi @robinjia , I have a couple of doubts, I was hoping you could help me since I am kind of stuck on this.

  1. What version of python is recommended to be used with this? I am using python 2.7
  2. What is the sklearn and scikit package version that is recommended?
    I run into the following error while trying to find neighbours for both the python3 and python2.7 case
    
    File "src/py/find_squad_nearby_words.py", line 77, in <module>
    main()
    File "src/py/find_squad_nearby_words.py", line 72, in main
    nearby_words = get_nearby_words(words)
    File "src/py/find_squad_nearby_words.py", line 60, in get_nearby_words
    tree = KDTree(all_vecs)
    File "sklearn/neighbors/binary_tree.pxi", line 1067, in sklearn.neighbors.kd_tree.BinaryTree.__init__
    AttributeError: 'list' object has no attribute 'size'
robinjia commented 4 years ago

Hi,

python2.7 is recommended for this. You probably need an older version of scikit-learn since this project was from a few years ago, I think I was on 0.19.1. Also note that the final dataset files are on codalab if you are just looking for those https://worksheets.codalab.org/worksheets/0xc86d3ebe69a3427d91f9aaa63f7d1e7d/

naveenjafer commented 4 years ago

Hi Jia, thank you for confirming. Yeah I think versions were the issue, tried out older versions and it works now. Cheers!