Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@loretoparisi
Last active October 23, 2018 11:52
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save loretoparisi/9311328876526f37f4893de3c293bd46 to your computer and use it in GitHub Desktop.
Save loretoparisi/9311328876526f37f4893de3c293bd46 to your computer and use it in GitHub Desktop.
Facebook AI Research (FAIR) SentEval InferSent install
# scipy, numpy, scikit-learn
pip install numpy
pip install scipy
pip install scikit-learn
pip install sklearn
# cabextract
sudo apt-get install cabextract
# conda needed for pytorch
curl https://repo.continuum.io/miniconda/Miniconda2-latest-Linux-x86_64.sh -o Miniconda2-latest-Linux-x86_64.sh
# todo: needs manual [ENTER] the T&C agreement
bash Miniconda2-latest-Linux-x86_64.sh
# update PATH
source $HOME/.bashrc
# pytorch
conda install pytorch torchvision cuda80 -c soumith
# senteval
git clone https://github.com/facebookresearch/SentEval.git
# infersent
git clone https://github.com/facebookresearch/InferSent.git
# install dataset
cd SentEval/data
./get_transfer_data.bash
cd ..
# inferSent models
curl -Lo examples/infersent.allnli.pickle https://s3.amazonaws.com/senteval/infersent/infersent.allnli.pickle
curl -Lo examples/infersent.snli.pickle https://s3.amazonaws.com/senteval/infersent/infersent.snli.pickle
# gloVe models
cd examples/
./get_glove.bash
##################
# test gloVe
python bow.py
##################
# test infersent tasks
python infersent.py
@hossein-amirkhani
Copy link

Maybe the # infersent part should be replaced with:

curl -Lo examples/infersent1.pkl https://s3.amazonaws.com/senteval/infersent/infersent1.pkl
curl -Lo examples/infersent2.pkl https://s3.amazonaws.com/senteval/infersent/infersent2.pkl

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment