PyText, for a ride
Recently facebook opensourced Pytext, for rapid prototyping and deploying deep-learning based models. I took it for a spin, and documented few examples on it. especially RNN and LSTMs.
#STEP 1 - Prepare environment
$ install conda
$ conda -V
$ conda create -n py37-nlp python=3.7 anaconda
$ conda env list
$ conda activate py37-nlp
#STEP 2 - Jupyter installation
(py37-nlp)$ conda install jupyter
#Edit bashrc and add following aliases
(py37-nlp)$ vi ~/.bashrc
alias jnb='jupyter notebook --no-browser --ip=cj4hdl002.cars.com --port=8893'
alias jnl='jupyter notebook list'
(py37-nlp)$ source ~/.bashrc
#STEP3 - Install Pytext
(py37-nlp)$ pip install pytext-nlp
Using cached https://files.pythonhosted.org/packages/cc/a3/777d4c085299e44fc8d3f3f78de05c995cd569c8724ba831f7d06963278e/pytext_nlp-0.1.2-py3-none-any.whl
Collecting tensorboardX (from pytext-nlp)
Using cached https://files.pythonhosted.org/packages/3b/10/0cc87d34b4a02109bee5f7b9bd9c95524fbb540311f6fbcc3758591a3f3a/tensorboardX-1.5-py2.py3-none-any.whl
Collecting future (from pytext-nlp)
Using cached https://files.pythonhosted.org/packages/90/52/e20466b85000a181e1e144fd8305caf2cf475e2f9674e797b222f8105f5f/future-0.17.1.tar.gz
Requirement already satisfied: requests in ./.conda/envs/py37-nlp/lib/python3.7/site-packages (from pytext-nlp) (2.19.1)
Collecting joblib (from pytext-nlp)
Using cached https://files.pythonhosted.org/packages/0d/1b/995167f6c66848d4eb7eabc386aebe07a1571b397629b2eac3b7bebdc343/joblib-0.13.0-py2.py3-none-any.whl
Requirement already satisfied: pandas in ./.conda/envs/py37-nlp/lib/python3.7/site-packages (from pytext-nlp) (0.23.4)
Collecting torchtext (from pytext-nlp)
Using cached https://files.pythonhosted.org/packages/c6/bc/b28b9efb4653c03e597ed207264eea45862b5260f48e9f010b5068d64db1/torchtext-0.3.1-py3-none-any.whl
Requirement already satisfied: scipy in ./.conda/envs/py37-nlp/lib/python3.7/site-packages (from pytext-nlp) (1.1.0)
Collecting onnx (from pytext-nlp)
Using cached https://files.pythonhosted.org/packages/f9/02/03c432628b6985c72f8e5ff35ea6db4bbc691eb0b1c7649d26772bbfa201/onnx-1.3.0.tar.gz
Complete output from command python setup.py egg_info:
fatal: Not a git repository (or any of the parent directories): .git
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-edyvn7gn/onnx/setup.py", line 71, in <module>
assert CMAKE, 'Could not find "cmake" executable!'
AssertionError: Could not find "cmake" executable!
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-edyvn7gn/onnx/
You are using pip version 10.0.1, however version 18.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
I had delayed my work on this project till today (2/6/2019). And I just saw a release form FB about latest release with ONNX 1.3.0 freeze; this shows me, that FB is really dedicated to this project, and i will give this project a shot tomorrow. — here —