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

Distributed Section Error in Encodec on Termux #82

Open
Manamama opened this issue Mar 22, 2024 · 0 comments
Open

Distributed Section Error in Encodec on Termux #82

Manamama opened this issue Mar 22, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@Manamama
Copy link

🐛 Bug Report

I encountered an issue while running Encodec on Termux, a terminal emulator for Android. The problem arises from the encodec/distrib.py file, specifically the is_distributed() function and the all_reduce() function.

To Reproduce

  1. Install Encodec on Termux.
  2. Run any Encodec command that uses the encodec/distrib.py file.
  3. Observe the AttributeError that occurs when torch.distributed.ReduceOp.SUM is called in the all_reduce() function.

Expected behavior

I expected the Encodec command to run without any errors.

Actual Behavior

An AttributeError occurred because the torch.distributed module is not available in a non-distributed environment like Termux.

Your Environment

  • Python version: 3.11.8
  • PyTorch version: 2
  • Operating system: Android 11 aarch64
  • Shell: /data/data/com.termux/files/usr/bin/bash
  • Hardware: Droid

Fyi, after disabling, it runs:

Success: no issues found in 19 source files python3 -m encodec.binary <frozen runpy>:128: RuntimeWarning: 'encodec.binary' found in sys.modules after import of package 'encodec', but prior to execution of 'encodec.binary'; this may result in unpredictable behaviour python3 -m encodec.compress <frozen runpy>:128: RuntimeWarning: 'encodec.compress' found in sys.modules after import of package 'encodec', but prior to execution of 'encodec.compress'; this may result in unpredictable behaviour /data/data/com.termux/files/usr/lib/python3.11/site-packages/torch/nn/utils/weight_norm.py:30: UserWarning: torch.nn.utils.weight_norm is deprecated in favor of torch.nn.utils.parametrizations.weight_norm. warnings.warn("torch.nn.utils.weight_norm is deprecated in favor of torch.nn.utils.parametrizations.weight_norm.") Doing encodec_24khz, use_lm=False /data/data/com.termux/files/usr/lib/python3.11/site-packages/torch/nn/utils/weight_norm.py:30: UserWarning: torch.nn.utils.weight_norm is deprecated in favor of torch.nn.utils.parametrizations.weight_norm. warnings.warn("torch.nn.utils.weight_norm is deprecated in favor of torch.nn.utils.parametrizations.weight_norm.") kbps: 12.1, time comp: 8.4 sec. time decomp:4.5. Doing encodec_24khz, use_lm=True Downloading: "https://dl.fbaipublicfiles.com/encodec/v0/encodec_lm_24khz-1608e3c0.th" to /data/data/com.termux/files/home/.cache/torch/hub/checkpoints/encodec_lm_24khz-1608e3c0.th 27%|██▏ | 15.9M/59.4M [04:57<

@Manamama Manamama added the bug Something isn't working label Mar 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant