Error with posix_ipc semaphore when trying to run AutoPCP
Hello, I am trying to run AutoPCP on my computer but I get the following error. Any help would be greatly appreciated.
Error in call to target 'stopes.core.launcher.Launcher': AttributeError("'posix_ipc.Semaphore' object has no attribute 'value'") full_key: launcher
I ran all the following commands for installation:
python -m pip install --upgrade pip pip install wheel pip install fairseq==0.12.2 git clone https://github.com/facebookresearch/stopes.git cd stopes pip install -e '.[dev,mono,mining]' pip install -e '.[auto_pcp]'
I've tried creating a virtual environment for the project and installing all the dependencies on there but still get the same error. I am using an m1 Mac and I have version 1.1.1 of posix-ipc. Below is the command I am running along with the full stack trace.
`HYDRA_FULL_ERROR=1 python -m stopes.modules +compare_audios=AutoPCP_multilingual_v2
+compare_audios.input_file=input.tsv
++compare_audios.src_audio_column=src_audio
++compare_audios.tgt_audio_column=tgt_audio
+compare_audios.named_columns=true
+compare_audios.output_file=output.txt
/Users/andy/miniconda3/lib/python3.11/site-packages/hydra/_internal/hydra.py:119: UserWarning: Future Hydra versions will no longer change working directory at job runtime by default.
See https://hydra.cc/docs/1.2/upgrades/1.1_to_1.2/changes_to_job_working_dir/ for more information.
ret = run_job(
Error executing job with overrides: ['+compare_audios=AutoPCP_multilingual_v2', '+compare_audios.input_file=input.tsv', '++compare_audios.src_audio_column=src_audio', '++compare_audios.tgt_audio_column=tgt_audio', '+compare_audios.named_columns=true', '+compare_audios.output_file=output.txt']
Traceback (most recent call last):
File "/Users/andy/miniconda3/lib/python3.11/site-packages/hydra/_internal/instantiate/_instantiate2.py", line 92, in _call_target
return target(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/andy/Desktop/UTEP/Fall23/Research/stopes/stopes/core/launcher.py", line 267, in init
self.throttle = utils.AsyncIPCSemaphore(
^^^^^^^^^^^^^^^^^^^^^^^^
File "
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "
Hi @andysegura89!
It looks like you are using a submitit launcher, which is expected to work with a Slurm cluster (this is what we are using by default in the FAIR internal cluster).
Please try adding the launcher=local line to your command; it will use a local launcher without the semaphore that is apparently causing the problem.
In my experience, when running the commend locally, it might be also needed to export the USER environment variable, to please Hydra.
So the full command could look like
export USER=anything && python -m stopes.modules +compare_audios=AutoPCP_multilingual_v2 \
+compare_audios.input_file=input.tsv \
compare_audios.src_audio_column=src_audio \
compare_audios.tgt_audio_column=tgt_audio \
+compare_audios.named_columns=true \
+compare_audios.output_file=output.txt \
launcher=local