Open luisfonseca97 opened 3 years ago
Hi @luisfonseca97 , the set_environment.sh
does nothing by default. It is there for you to put commands that set system variables or activate virtual environments. This is useful to control your setup when running on clusters or avoid polluting your ~/.bashrc
.
An example could be
# activate anaconda
eval "$(/home/luis/anaconda3//bin/conda shell.bash hook)"
# create a virtual environment if it does not exist and activate it
[ ! -d venv ] && virtualenv venv
source venv/bin/activate
but you dont seem to need this so you can leave this empty as it is.
The error you show seems related to either torch or Python. Have you tried with a lower version of Python? (e.g. 3.6)
The error is very likely related to torch, when I tried to install the requirements it said that torch 1.1.0 was not available so I changed the requirements file to torch==1.4.0 since it was the next available version (probably a very dumb thing to do). I will try with python 3.6, maybe then it will be possible to use torch 1.1.0, unfortunately, a few hours ago my ubuntu stopped booting so it will take a while :/
yes, this version needs torch==1.1.0
I believe I have installed python3.6 now:
luis@luis-BOHK-WAX9X:~/transition-amr-parser$ python3.6
Python 3.6.8 (default, May 16 2021, 15:43:44)
[GCC 10.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>
I have tried to run pip install -r scripts/stack-transformer/requirements.txt
which still gives me an error because of the torch:
ERROR: Could not find a version that satisfies the requirement torch==1.1.0 (from -r scripts/stack-transformer/requirements.txt (line 9)) (from versions: 0.1.2, 0.1.2.post1, 0.1.2.post2, 1.4.0, 1.5.0, 1.5.1, 1.6.0, 1.7.0, 1.7.1, 1.8.0, 1.8.1)
ERROR: No matching distribution found for torch==1.1.0 (from -r scripts/stack-transformer/requirements.txt (line 9))
and I have tried pip3.6 install -r scripts/stack-transformer/requirements.txt
which also gives me an error, but now related to another requirement:
pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
Collecting cffi (from -r scripts/stack-transformer/requirements.txt (line 2))
Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.",)': /simple/cffi/
Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.",)': /simple/cffi/
Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.",)': /simple/cffi/
Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.",)': /simple/cffi/
Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.",)': /simple/cffi/
Could not fetch URL https://pypi.org/simple/cffi/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/cffi/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.",)) - skipping
Could not find a version that satisfies the requirement cffi (from -r scripts/stack-transformer/requirements.txt (line 2)) (from versions: )
No matching distribution found for cffi (from -r scripts/stack-transformer/requirements.txt (line 2))
pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.",)) - skipping
Is there any other command I should try to install the requirements?
I happened to get exactly the same behaviour. If not using python 3.6 I got
ERROR: Could not find a version that satisfies the requirement torch==1.1.0 (from -r scripts/stack-transformer/requirements.txt (line 9))
(from versions: 0.1.2, 0.1.2.post1, 0.1.2.post2, 1.4.0, 1.5.0, 1.5.1, 1.6.0, 1.7.0, 1.7.1, 1.8.0, 1.8.1)
ERROR: No matching distribution found for torch==1.1.0 (from -r scripts/stack-transformer/requirements.txt (line 9))
Installing python 3.6 in a conda environment and then installing the requirements.txt then torch 1.1.0 is found and installed correctly but fastBPE breaks.
Maybe is an OS problem. What OS are you using @davidbp @luisfonseca97 ? This was all tested in OSX and Linux.
You could also upgrade to torch 0.1.2 although this is the first version that uses built in transformers and this may introduce some changes.
I am using Linux
I was using OSX. It seems fastBPE has several problems in OSX.
Inside the conda environment I get the following error (which has nothing to do with this repo though).
Weirdly enough outside the conda environment I could do the pip install and import fastBPE
is imported without any issue.
pip install fastBPE
Collecting fastBPE
Using cached fastBPE-0.1.0.tar.gz (35 kB)
Building wheels for collected packages: fastBPE
Building wheel for fastBPE (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /Users/davidbuchaca1/opt/anaconda3/envs/arm_parser/bin/python3.6 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/05/h71x7gh54sx_5y43ppkq9_dw0000gq/T/pip-install-zo5za3f4/fastbpe_1939f1fc37ea41b1aaf78333c5ef5693/setup.py'"'"'; __file__='"'"'/private/var/folders/05/h71x7gh54sx_5y43ppkq9_dw0000gq/T/pip-install-zo5za3f4/fastbpe_1939f1fc37ea41b1aaf78333c5ef5693/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /private/var/folders/05/h71x7gh54sx_5y43ppkq9_dw0000gq/T/pip-wheel-sd94tz2j
cwd: /private/var/folders/05/h71x7gh54sx_5y43ppkq9_dw0000gq/T/pip-install-zo5za3f4/fastbpe_1939f1fc37ea41b1aaf78333c5ef5693/
Complete output (16 lines):
running bdist_wheel
running build
running build_py
package init file 'fastBPE/__init__.py' not found (or not a regular file)
running build_ext
building 'fastBPE' extension
creating build
creating build/temp.macosx-10.7-x86_64-3.6
creating build/temp.macosx-10.7-x86_64-3.6/fastBPE
/usr/bin/clang -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/usr/local/opt/libomp/include -Xpreprocessor -fopenmp -I/Users/davidbuchaca1/opt/anaconda3/envs/arm_parser/include/python3.6m -c fastBPE/fastBPE.cpp -o build/temp.macosx-10.7-x86_64-3.6/fastBPE/fastBPE.o -std=c++11 -Ofast -pthread
clang: warning: include path for libstdc++ headers not found; pass '-stdlib=libc++' on the command line to use the libc++ standard library instead [-Wstdlibcxx-not-found]
fastBPE/fastBPE.cpp:603:10: fatal error: 'ios' file not found
#include "ios"
^~~~~
1 error generated.
error: command '/usr/bin/clang' failed with exit status 1
----------------------------------------
ERROR: Failed building wheel for fastBPE
Running setup.py clean for fastBPE
Failed to build fastBPE
Installing collected packages: fastBPE
Running setup.py install for fastBPE ... error
ERROR: Command errored out with exit status 1:
command: /Users/davidbuchaca1/opt/anaconda3/envs/arm_parser/bin/python3.6 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/05/h71x7gh54sx_5y43ppkq9_dw0000gq/T/pip-install-zo5za3f4/fastbpe_1939f1fc37ea41b1aaf78333c5ef5693/setup.py'"'"'; __file__='"'"'/private/var/folders/05/h71x7gh54sx_5y43ppkq9_dw0000gq/T/pip-install-zo5za3f4/fastbpe_1939f1fc37ea41b1aaf78333c5ef5693/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/05/h71x7gh54sx_5y43ppkq9_dw0000gq/T/pip-record-73xogknr/install-record.txt --single-version-externally-managed --compile --install-headers /Users/davidbuchaca1/opt/anaconda3/envs/arm_parser/include/python3.6m/fastBPE
cwd: /private/var/folders/05/h71x7gh54sx_5y43ppkq9_dw0000gq/T/pip-install-zo5za3f4/fastbpe_1939f1fc37ea41b1aaf78333c5ef5693/
Complete output (16 lines):
running install
running build
running build_py
package init file 'fastBPE/__init__.py' not found (or not a regular file)
running build_ext
building 'fastBPE' extension
creating build
creating build/temp.macosx-10.7-x86_64-3.6
creating build/temp.macosx-10.7-x86_64-3.6/fastBPE
/usr/bin/clang -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/usr/local/opt/libomp/include -Xpreprocessor -fopenmp -I/Users/davidbuchaca1/opt/anaconda3/envs/arm_parser/include/python3.6m -c fastBPE/fastBPE.cpp -o build/temp.macosx-10.7-x86_64-3.6/fastBPE/fastBPE.o -std=c++11 -Ofast -pthread
clang: warning: include path for libstdc++ headers not found; pass '-stdlib=libc++' on the command line to use the libc++ standard library instead [-Wstdlibcxx-not-found]
fastBPE/fastBPE.cpp:603:10: fatal error: 'ios' file not found
#include "ios"
^~~~~
1 error generated.
error: command '/usr/bin/clang' failed with exit status 1
----------------------------------------
ERROR: Command errored out with exit status 1: /Users/davidbuchaca1/opt/anaconda3/envs/arm_parser/bin/python3.6 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/05/h71x7gh54sx_5y43ppkq9_dw0000gq/T/pip-install-zo5za3f4/fastbpe_1939f1fc37ea41b1aaf78333c5ef5693/setup.py'"'"'; __file__='"'"'/private/var/folders/05/h71x7gh54sx_5y43ppkq9_dw0000gq/T/pip-install-zo5za3f4/fastbpe_1939f1fc37ea41b1aaf78333c5ef5693/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/05/h71x7gh54sx_5y43ppkq9_dw0000gq/T/pip-record-73xogknr/install-record.txt --single-version-externally-managed --compile --install-headers /Users/davidbuchaca1/opt/anaconda3/envs/arm_parser/include/python3.6m/fastBPE Check the logs for full command output.
See if you have the same problems with the action-pointer. Installation has improved and it uses a more advanced Pytorch.
@luisfonseca97 I met the same problem. Did you solve it?
Hi, I'm having problems running the _bash tests/minimaltest.sh command. I am not sure why this is happening but I believe it starts when I try to set the environment. I already added execution permissions for the _setenvironment.sh by running _chmod a+x setenvironment.sh but when I try to execute it, nothing seems to happen:
Futhermore, running _bash scripts/download_and_patchfairseq.sh seems that it is also doing nothing:
Everything is installed properly:
But when I run _bash tests/minimaltest.sh it does not test (I will leave the full message for convenience).
Any idea why this might be happening?