Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What are the recommended conda environment specifications to run this project conda activate ssl ? #6

Open
Abdullah-Eisa opened this issue Jun 16, 2024 · 4 comments

Comments

@Abdullah-Eisa
Copy link

Abdullah-Eisa commented Jun 16, 2024

I'm encountering issues running the project due to incompatibilities between Python interpreter versions and packages. Pip/Conda doesn't seem to be correctly resolving dependency versions, leading to errors.

I have checked the prepare section here (https://github.com/nii-yamagishilab/PartialSpoof/tree/main/03multireso#prepare), and it's not clear what are recommended conda environment configuration and python interpreter version and other python packages specifications here: conda activate ssl

Could you please provide details on the following:

  1. Recommended conda environment: Is there a specific conda environment configuration that is recommended to run the project successfully?
  2. Python interpreter version: Which version of the Python interpreter is required or recommended for this project?
  3. Dependency versions: Are there any specific versions of Python packages (e.g. numpy ...etc) that are required or recommended for compatibility?
@Abdullah-Eisa
Copy link
Author

Hi @zlin0,

Having trouble setting up the conda environment for PartialSpoof project. Any guidance on recommended versions/configurations would be greatly appreciated!

Thanks,

@Abdullah-Eisa Abdullah-Eisa changed the title What are the recommended conda environment specifications to run this project? What are the recommended conda environment specifications to run this project conda activate ssl ? Jun 17, 2024
@zlin0
Copy link
Contributor

zlin0 commented Jul 3, 2024

Hi @Abdullah-Eisa, thank you for your interest in PartialSpoof.

Did you download s3prl in the corresponding version as mentioned in the README?

The SSL model used in this project is based on s3prl. Please follow s3prl#installation to build the environment.

My SSL environment fully follows that version of s3prl. The new version might not support the old commands.

@Abdullah-Eisa
Copy link
Author

Abdullah-Eisa commented Jul 11, 2024

Hi @zlin0 ,

Thank you for your response and detailed explanation.

I have followed the s3prl#installation as mentioned and ensured it was installed successfully. However, while carefully following the README here (https://github.com/nii-yamagishilab/PartialSpoof/tree/main/03multireso#usuage), I encountered several errors related to incompatible versions of torchaudio and other python libraries with the PartialSpoof project itself.

Could you please provide the specific versions of Python libraries required for this project? or at least the versions of the following libraries: Torch, Torchvision, Torchaudio, transformers ? As the s3prl installation instructions do not specify these versions, and following them did not resolve the compatibility issues.
I understand that you are occupied with other projects. I deeply appreciate your effort if you just run pip freeze > requirements.txt or conda list -e > requirements.txt and share the requirements.txt file with us.

Thank you for your assistance.

By the way, I am running the project on git bash at vscode in windows 10.

Here are my conda environment after following s3prl#installation :

absl-py==2.1.0
accelerate==0.32.1
aiohttp==3.9.5
aiosignal==1.3.1
antlr4-python3-runtime==4.8
asteroid==0.4.4
asteroid-filterbanks==0.4.0
async-timeout==4.0.3
attrs==23.2.0
audioread==3.0.1
beautifulsoup4==4.12.3
cached-property==1.5.2
cachetools==4.2.4
catalyst==22.4
certifi==2024.7.4
cffi==1.16.0
charset-normalizer==3.3.2
click==8.1.7
colorama==0.4.6
contourpy==1.2.1
cycler==0.12.1
Cython==3.0.10
decorator==5.1.1
dtw-python==1.1.6
easydict==1.13
editdistance==0.8.1
einops==0.8.0
fairseq @ git+https://github.com//pytorch/fairseq.git@f2146bdc7abf293186de9449bfa2272775e39e1d
filelock @ file:///C:/b/abs_f2gie28u58/croot/filelock_1700591233643/work
fonttools==4.53.1
frozenlist==1.4.1
fsspec==2024.6.1
future==1.0.0
gdown==5.2.0
gmpy2 @ file:///C:/ci/gmpy2_1645455782955/work
google-auth==1.35.0
google-auth-oauthlib==0.4.6
grpcio==1.64.1
h5py==3.11.0
huggingface_hub @ git+https://github.com/huggingface/huggingface_hub.git@f79eaf82e3474d518402dc73c424a3f1019d23e6
hydra-core==1.0.7
hydra-slayer==0.5.0
idna==3.7
importlib_metadata==8.0.0
importlib_resources==6.4.0
intel-openmp==2021.4.0
intervaltree==3.1.0
Jinja2 @ file:///C:/b/abs_92fccttino/croot/jinja2_1716993447201/work
joblib==1.4.2
julius==0.2.7
kaldi-io==0.9.8
kiwisolver==1.4.5
lazy_loader==0.4
librosa==0.10.2.post1
lightning-utilities==0.11.3.post0
llvmlite==0.39.1
lxml==5.2.2
Markdown==3.6
MarkupSafe @ file:///C:/b/abs_ecfdqh67b_/croot/markupsafe_1704206030535/work
matplotlib==3.7.5
mir_eval==0.7
mkl==2021.4.0
mkl-fft @ file:///C:/b/abs_19i1y8ykas/croot/mkl_fft_1695058226480/work
mkl-random @ file:///C:/b/abs_edwkj1_o69/croot/mkl_random_1695059866750/work
mkl-service==2.4.0
mpmath @ file:///C:/b/abs_7833jrbiox/croot/mpmath_1690848321154/work
msgpack==1.0.8
multidict==6.0.5
networkx @ file:///C:/b/abs_3bxnu56g9d/croot/networkx_1717597507456/work
nltk==3.8.1
normalise==0.1.8
numba==0.56.4
numpy==1.20.3
oauthlib==3.2.2
omegaconf==2.0.6
packaging==24.1
pandas==2.0.3
pb-bss-eval==0.0.2
pesq==0.0.4
pillow==10.4.0
platformdirs==4.2.2
pooch==1.8.2
portalocker==2.10.0
protobuf==3.20.3
psutil==6.0.0
pyasn1==0.6.0
pyasn1_modules==0.4.0
pycparser==2.22
pyparsing==3.1.2
pysndfx==0.3.6
PySocks==1.7.1
pystoi==0.4.1
python-dateutil==2.9.0.post0
pytorch-lightning==2.3.2
pytorch-ranger==0.1.1
pytz==2024.1
pywin32==306
PyYAML @ file:///C:/b/abs_782o3mbw7z/croot/pyyaml_1698096085010/work
regex==2024.5.15
requests==2.32.3
requests-oauthlib==2.0.0
roman==4.2
rsa==4.9
-e git+https://github.com/Abdullah-Eisa/Partial_Spoof_Detection.git@b913d5fdeac177f00eb44194d6e6dec9c1a8a0b8#egg=s3prl&subdirectory=modules\s3prl
sacrebleu==2.4.2
safetensors==0.4.3
scikit-learn==1.5.1
scipy==1.10.1
sentencepiece==0.2.0
six==1.16.0
sortedcontainers==2.4.0
soundfile==0.12.1
soupsieve==2.5
sox==1.5.0
soxr==0.3.7
sympy==1.12.1
tabulate==0.9.0
tbb==2021.13.0
tensorboard==2.6.0
tensorboard-data-server==0.6.1
tensorboard-plugin-wit==1.8.1
tensorboardX==2.2
threadpoolctl==3.5.0
tokenizers==0.19.1
torch==1.9.0
torch-optimizer==0.3.0
torch-stoi==0.2.1
torchaudio==0.9.0
torchmetrics==1.4.0.post0
torchvision==0.10.0
tqdm==4.66.4
transformers==4.42.3
typing_extensions @ file:///C:/b/abs_0as9mdbkfl/croot/typing_extensions_1715268906610/work
tzdata==2024.1
urllib3==2.2.2
Werkzeug==3.0.3
yarl==1.9.4
zipp==3.19.2

Here are some of the errors I encountered:

�[94m-------------------------------------------------�[0m
�[94m---  Start program 2024-07-12 19:41:56.274179 ---�[0m
�[94m-------------------------------------------------�[0m
################################################################################
### WARNING, path does not exist: KALDI_ROOT=/mnt/matylda5/iveselyk/Tools/kaldi-trunk
###          (please add 'export KALDI_ROOT=<your_path>' in your $HOME/.profile)
###          (or run as: KALDI_ROOT=<your_path> python <your_script>.py)
################################################################################

�[94mLoad module: config_ps.config_test_on_eval�[0m
�[94mLoad module: model�[0m
Traceback (most recent call last):
  File "C:\Users\Abdullah\miniconda3\envs\fairseq\lib\site-packages\transformers\utils\import_utils.py", line 1560, in _get_module
    return importlib.import_module("." + module_name, self.__name__)
  File "C:\Users\Abdullah\miniconda3\envs\fairseq\lib\importlib\__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 850, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "C:\Users\Abdullah\miniconda3\envs\fairseq\lib\site-packages\transformers\generation\utils.py", line 114, in <module>
    from accelerate.hooks import AlignDevicesHook, add_hook_to_module
  File "C:\Users\Abdullah\miniconda3\envs\fairseq\lib\site-packages\accelerate\__init__.py", line 16, in <module>
    from .accelerator import Accelerator
  File "C:\Users\Abdullah\miniconda3\envs\fairseq\lib\site-packages\accelerate\accelerator.py", line 131, in <module>
    from torch.distributed.algorithms.join import Join
ModuleNotFoundError: No module named 'torch.distributed.algorithms.join'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "C:\Users\Abdullah\miniconda3\envs\fairseq\lib\site-packages\transformers\utils\import_utils.py", line 1560, in _get_module
    return importlib.import_module("." + module_name, self.__name__)
  File "C:\Users\Abdullah\miniconda3\envs\fairseq\lib\importlib\__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 850, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "C:\Users\Abdullah\miniconda3\envs\fairseq\lib\site-packages\transformers\models\wav2vec2\modeling_wav2vec2.py", line 40, in <module>
    from ...modeling_utils import PreTrainedModel
  File "C:\Users\Abdullah\miniconda3\envs\fairseq\lib\site-packages\transformers\modeling_utils.py", line 46, in <module>
    from .generation import GenerationConfig, GenerationMixin
  File "<frozen importlib._bootstrap>", line 1055, in _handle_fromlist
  File "C:\Users\Abdullah\miniconda3\envs\fairseq\lib\site-packages\transformers\utils\import_utils.py", line 1550, in __getattr__
    module = self._get_module(self._class_to_module[name])
  File "C:\Users\Abdullah\miniconda3\envs\fairseq\lib\site-packages\transformers\utils\import_utils.py", line 1562, in _get_module
    raise RuntimeError(
RuntimeError: Failed to import transformers.generation.utils because of the following error (look up to see its traceback):
No module named 'torch.distributed.algorithms.join'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "E:\projects\PartialSpoof\03multireso\multi-reso\01\main.py", line 185, in <module>
    main()
  File "E:\projects\PartialSpoof\03multireso\multi-reso\01\main.py", line 45, in main
    prj_model = importlib.import_module(args.module_model)
  File "C:\Users\Abdullah\miniconda3\envs\fairseq\lib\importlib\__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 850, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "E:\projects\PartialSpoof\03multireso\multi-reso\01\model.py", line 37, in <module>
    import s3prl.hub as hub
  File "E:\projects\PartialSpoof\modules\s3prl\s3prl\hub.py", line 30, in <module>
    _get_hubconf_entries()
  File "E:\projects\PartialSpoof\modules\s3prl\s3prl\hub.py", line 14, in _get_hubconf_entries
    _module = importlib.import_module(_module_name, package=__package__)
  File "C:\Users\Abdullah\miniconda3\envs\fairseq\lib\importlib\__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "E:\projects\PartialSpoof\modules\s3prl\s3prl\upstream\__init__.py", line 1, in <module>
    from . import experts
  File "E:\projects\PartialSpoof\modules\s3prl\s3prl\upstream\experts.py", line 24, in <module>
    _get_experts()
  File "E:\projects\PartialSpoof\modules\s3prl\s3prl\upstream\experts.py", line 11, in _get_experts
    _module = importlib.import_module(_module_name, package=__package__)
  File "C:\Users\Abdullah\miniconda3\envs\fairseq\lib\importlib\__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "E:\projects\PartialSpoof\modules\s3prl\s3prl\upstream\wav2vec2_hug\expert.py", line 6, in <module>
    from transformers import Wav2Vec2Processor, Wav2Vec2Model
  File "<frozen importlib._bootstrap>", line 1055, in _handle_fromlist
  File "C:\Users\Abdullah\miniconda3\envs\fairseq\lib\site-packages\transformers\utils\import_utils.py", line 1551, in __getattr__
    value = getattr(module, name)
  File "C:\Users\Abdullah\miniconda3\envs\fairseq\lib\site-packages\transformers\utils\import_utils.py", line 1550, in __getattr__
    module = self._get_module(self._class_to_module[name])
  File "C:\Users\Abdullah\miniconda3\envs\fairseq\lib\site-packages\transformers\utils\import_utils.py", line 1562, in _get_module
    raise RuntimeError(
RuntimeError: Failed to import transformers.models.wav2vec2.modeling_wav2vec2 because of the following error (look up to see its traceback):
Failed to import transformers.generation.utils because of the following error (look up to see its traceback):
No module named 'torch.distributed.algorithms.join'

@zlin0
Copy link
Contributor

zlin0 commented Oct 7, 2024

Hi @Abdullah-Eisa, so sorry for the late reply. I have already graduated from my lab and no longer have access to my unsaved Conda environment. My friend kindly assisted me to export versions of all packages in the environment ssl as attached. I hope this will be helpful to you.

ssl.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants