Commit 3844a2bd authored by moto's avatar moto Committed by Facebook GitHub Bot
Browse files

Disable CTC decoder bundle by default (#3232)

Summary:
As we migrate to use upstream flashlight-text and KenLM, this PR disable building CTC decoder by default.
This will stop shipping flashlight-text and KenLM bundle in torchaudio binary.

Ref: https://github.com/pytorch/audio/issues/3088

cc jacobkahn

Pull Request resolved: https://github.com/pytorch/audio/pull/3232

Reviewed By: hwangjeff

Differential Revision: D44650872

Pulled By: mthrok

fbshipit-source-id: 2415623abaf3cafa181135db5112d3c711137cd7
parent ea212c6e
...@@ -58,7 +58,7 @@ printf "Installing PyTorch with %s\n" "${cudatoolkit}" ...@@ -58,7 +58,7 @@ printf "Installing PyTorch with %s\n" "${cudatoolkit}"
# 2. Install torchaudio # 2. Install torchaudio
printf "* Installing torchaudio\n" printf "* Installing torchaudio\n"
BUILD_CTC_DECODER=0 python setup.py install python setup.py install
# 3. Install Test tools # 3. Install Test tools
printf "* Installing test tools\n" printf "* Installing test tools\n"
......
...@@ -50,7 +50,6 @@ fi ...@@ -50,7 +50,6 @@ fi
# 2. Install torchaudio # 2. Install torchaudio
printf "* Installing torchaudio\n" printf "* Installing torchaudio\n"
export BUILD_CTC_DECODER=0
"$root_dir/packaging/vc_env_helper.bat" python setup.py install "$root_dir/packaging/vc_env_helper.bat" python setup.py install
# 3. Install Test tools # 3. Install Test tools
......
...@@ -72,7 +72,7 @@ jobs: ...@@ -72,7 +72,7 @@ jobs:
# TODO: Enable NVDec/NVEnc # TODO: Enable NVDec/NVEnc
conda install --quiet -y 'ffmpeg>=4.1' pkg-config conda install --quiet -y 'ffmpeg>=4.1' pkg-config
pip --quiet install cmake>=3.18.0 ninja pip --quiet install cmake>=3.18.0 ninja
BUILD_CTC_DECODER=0 USE_FFMPEG=1 pip install --progress-bar off -v -e . --no-use-pep517 USE_FFMPEG=1 pip install --progress-bar off -v -e . --no-use-pep517
# Install runtime dependencies # Install runtime dependencies
pip --quiet install git+https://github.com/kpu/kenlm/ flashlight-text pip --quiet install git+https://github.com/kpu/kenlm/ flashlight-text
......
...@@ -29,7 +29,7 @@ jobs: ...@@ -29,7 +29,7 @@ jobs:
run: | run: |
python -m pip install --quiet --upgrade pip python -m pip install --quiet --upgrade pip
python -m pip install --quiet --pre torch -f https://download.pytorch.org/whl/nightly/cpu/torch_nightly.html python -m pip install --quiet --pre torch -f https://download.pytorch.org/whl/nightly/cpu/torch_nightly.html
python -m pip install --quiet pytest requests cmake ninja deep-phonemizer sentencepiece python -m pip install --quiet pytest requests cmake ninja deep-phonemizer sentencepiece flashlight-text git+https://github.com/kpu/kenlm
python setup.py install python setup.py install
env: env:
USE_FFMPEG: true USE_FFMPEG: true
......
...@@ -57,7 +57,7 @@ jobs: ...@@ -57,7 +57,7 @@ jobs:
# Install torchaudio # Install torchaudio
conda install --quiet -y 'ffmpeg>=4.1' pkg-config conda install --quiet -y 'ffmpeg>=4.1' pkg-config
python3 -m pip --quiet install cmake>=3.18.0 ninja python3 -m pip --quiet install cmake>=3.18.0 ninja
BUILD_CTC_DECODER=0 USE_FFMPEG=1 python3 -m pip install -v -e . --no-use-pep517 USE_FFMPEG=1 python3 -m pip install -v -e . --no-use-pep517
# Install test tools # Install test tools
conda install -y --quiet -c conda-forge -c numba/label/dev 'librosa==0.10.0' parameterized 'requests>=2.20' conda install -y --quiet -c conda-forge -c numba/label/dev 'librosa==0.10.0' parameterized 'requests>=2.20'
......
...@@ -37,7 +37,7 @@ _BUILD_SOX = False if platform.system() == "Windows" else _get_build("BUILD_SOX" ...@@ -37,7 +37,7 @@ _BUILD_SOX = False if platform.system() == "Windows" else _get_build("BUILD_SOX"
_BUILD_KALDI = False if platform.system() == "Windows" else _get_build("BUILD_KALDI", True) _BUILD_KALDI = False if platform.system() == "Windows" else _get_build("BUILD_KALDI", True)
_BUILD_RIR = _get_build("BUILD_RIR", True) _BUILD_RIR = _get_build("BUILD_RIR", True)
_BUILD_RNNT = _get_build("BUILD_RNNT", True) _BUILD_RNNT = _get_build("BUILD_RNNT", True)
_BUILD_CTC_DECODER = _get_build("BUILD_CTC_DECODER", True) _BUILD_CTC_DECODER = _get_build("BUILD_CTC_DECODER", False)
_USE_FFMPEG = _get_build("USE_FFMPEG", False) _USE_FFMPEG = _get_build("USE_FFMPEG", False)
_USE_ROCM = _get_build("USE_ROCM", torch.backends.cuda.is_built() and torch.version.hip is not None) _USE_ROCM = _get_build("USE_ROCM", torch.backends.cuda.is_built() and torch.version.hip is not None)
_USE_CUDA = _get_build("USE_CUDA", torch.backends.cuda.is_built() and torch.version.hip is None) _USE_CUDA = _get_build("USE_CUDA", torch.backends.cuda.is_built() and torch.version.hip is None)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment