Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
ab42402
[DEBUG] setup_env.sh issue in activating conda environment
pearu Sep 3, 2025
72ff6be
Fix conda path to use _conda.exe
pearu Sep 3, 2025
f0866f2
disable silent miniconda installation
pearu Sep 3, 2025
ed011c2
undo last commit
pearu Sep 3, 2025
7e86b11
Use previous version of miniconda
pearu Sep 3, 2025
bd2c3a1
Use py3.9 of miniconda
pearu Sep 3, 2025
621ee70
Peak into Lib
pearu Sep 3, 2025
2cd0ef1
Move /S to the end in starting installer.
pearu Sep 3, 2025
db80ae4
Show errorlevel.
pearu Sep 3, 2025
5f0a62f
Use Power-Shell Start-Process
pearu Sep 3, 2025
3b0c7e7
Use shorted /D argument
pearu Sep 3, 2025
229512c
rename conda_dir
pearu Sep 3, 2025
c60b4eb
Shorten conda_dir
pearu Sep 3, 2025
757f7cb
Use miniconda v24.11
pearu Sep 3, 2025
2827acd
Check diskspace
pearu Sep 3, 2025
0cd9665
Try miniforge.
pearu Sep 3, 2025
d0f1dbe
Add check path length
pearu Sep 3, 2025
9cc16c7
Check if curl is downloading anything
pearu Sep 3, 2025
9eb608d
Use curl -L
pearu Sep 3, 2025
c5bd408
Use curl -L
pearu Sep 3, 2025
996ead2
Fix typo.
pearu Sep 3, 2025
da7c489
Remove -L to be sure it is needed
pearu Sep 3, 2025
c7dcaa9
Enable -L and use miniconda
pearu Sep 3, 2025
857b3e4
Clean up
pearu Sep 3, 2025
312e368
Clean up 2
pearu Sep 3, 2025
3382d01
Fix installing torch
pearu Sep 4, 2025
342d085
Clean up. Enable windows gpu workflow.
pearu Sep 4, 2025
4598c7e
Use CONDA_QUIET=1
pearu Sep 4, 2025
5a1de5b
Use Python 3.10 to get newer numpy
pearu Sep 4, 2025
996dd42
windows: skip linux tests + test_mvdr_weights_rtf
pearu Sep 4, 2025
2a7df6d
Use numpy from pypi.
pearu Sep 4, 2025
bd05c8d
windows: skip test_mvdr_weights
pearu Sep 4, 2025
898c2ee
windows: skip non-functional
pearu Sep 4, 2025
38d895f
Use CUBLAS_WORKSPACE_CONFIG to enable deterministic behavior in tests
pearu Sep 4, 2025
819d17c
Run only test_mvdr_weights tests
pearu Sep 4, 2025
fe3b4e7
Enable all linux tests
pearu Sep 4, 2025
3b94552
Skip librosa tests
pearu Sep 4, 2025
4af7794
Restore non-functional tests
pearu Sep 4, 2025
c22c1ca
Add allow-skip variables from PR4059.
pearu Sep 4, 2025
a4d696e
Add TORCHAUDIO_TEST_ALLOW_SKIP_IF_NO_QUANTIZATION=true
pearu Sep 4, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/scripts/unittest-windows/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ dependencies:
- scipy >= 1.4.1
- pip
- pip:
- PySoundFile
- future
- parameterized
- dataclasses
Expand Down
45 changes: 10 additions & 35 deletions .github/scripts/unittest-windows/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,17 @@ conda activate "${env_dir}"

source "$this_dir/set_cuda_envs.sh"

printf "* Installing torch import-time dependencies\n"
pip install numpy

# 1. Install PyTorch
if [ -z "${CUDA_VERSION:-}" ] ; then
cudatoolkit="cpuonly"
version="cpu"
wheel="cpu"
else
version="$(python -c "print('.'.join(\"${CUDA_VERSION}\".split('.')[:2]))")"
cudatoolkit="pytorch-cuda=${version}"
wheel="cu$(python -c "print(''.join(\"${CUDA_VERSION}\".split('.')[:2]))")"
fi
printf "Installing PyTorch with %s\n" "${cudatoolkit}"
conda install -y -c "pytorch-${UPLOAD_CHANNEL}" -c nvidia pytorch "${cudatoolkit}" pytest pybind11
printf "Installing PyTorch\n"
pip install --pre torch --index-url https://download.pytorch.org/whl/${UPLOAD_CHANNEL}/${wheel}

torch_cuda=$(python -c "import torch; print(torch.cuda.is_available())")
echo torch.cuda.is_available is $torch_cuda
Expand All @@ -42,30 +43,17 @@ if [ ! -z "${CUDA_VERSION:-}" ] ; then
fi

# 2. Install torchaudio
printf "* Installing fsspec\n"
printf "* Installing fsspec\n" # TODO: is this required for torchaudio??
pip install --trusted-host pypi.org --trusted-host files.pythonhosted.org fsspec

printf "* Installing torchaudio\n"
"$root_dir/packaging/vc_env_helper.bat" pip install . -v --no-build-isolation

# 3. Install Test tools
printf "* Installing test tools\n"
NUMBA_DEV_CHANNEL=""
SENTENCEPIECE_DEPENDENCY="sentencepiece"
case "$(python --version)" in
*3.9*)
# Numba isn't available for Python 3.9 except on the numba dev channel and building from source fails
# See https://github.com/librosa/librosa/issues/1270#issuecomment-759065048
NUMBA_DEV_CHANNEL="-c numba/label/dev"
;;
*3.10*)
# Don't install sentencepiece, no python 3.10 dependencies available for windows yet
SENTENCEPIECE_DEPENDENCY=""
NUMBA_DEV_CHANNEL="-c numba/label/dev"
;;
esac
(
conda install -y -c conda-forge ${NUMBA_DEV_CHANNEL} parameterized 'requests>=2.20'
conda install -y -c conda-forge parameterized 'requests>=2.20'
# Need to disable shell check since this'll fail out if SENTENCEPIECE_DEPENDENCY is empty
# shellcheck disable=SC2086
pip install \
Expand All @@ -77,18 +65,5 @@ esac
inflect \
pytest \
pytest-cov \
pytorch-lightning \
'scipy==1.7.3' \
unidecode \
'protobuf<4.21.0' \
demucs \
tinytag \
pyroomacoustics \
flashlight-text \
git+https://github.com/kpu/kenlm/
scipy
)
# Install fairseq
git clone https://github.com/pytorch/fairseq
cd fairseq
git checkout e47a4c8
pip install .
2 changes: 1 addition & 1 deletion .github/scripts/unittest-windows/run_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ python -m torch.utils.collect_env
env | grep TORCHAUDIO || true

cd test
pytest --continue-on-collection-errors --cov=torchaudio --junitxml=${RUNNER_TEST_RESULTS_DIR}/junit.xml -v --durations 20 torchaudio_unittest
pytest --continue-on-collection-errors --cov=torchaudio --junitxml=${RUNNER_TEST_RESULTS_DIR}/junit.xml -v --durations 20 torchaudio_unittest -k "not torchscript and not fairseq and not demucs and not librosa"
coverage html
7 changes: 4 additions & 3 deletions .github/scripts/unittest-windows/setup_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ if [ ! -d "${conda_dir}" ]; then
printf "* Installing conda\n"
export tmp_conda="$(echo $conda_dir | tr '/' '\\')"
export miniconda_exe="$(echo $root_dir | tr '/' '\\')\\miniconda.exe"
curl --silent --output miniconda.exe https://repo.anaconda.com/miniconda/Miniconda3-latest-Windows-x86_64.exe -O
# not using miniconda because its installation will be incomplete
# despite using `start /wait` in the install batch file
curl -L --silent --output miniconda.exe https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Windows-x86_64.exe -O
"$this_dir/install_conda.bat"
unset tmp_conda
unset miniconda_exe
Expand All @@ -34,5 +36,4 @@ fi
conda activate "${env_dir}"

# 3. Install minimal build tools
pip --quiet install cmake ninja
conda install --quiet -y 'ffmpeg>=4.1'
conda install -y -c conda-forge cmake ninja
2 changes: 2 additions & 0 deletions .github/workflows/unittest-linux-cpu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ jobs:

# Set up Environment Variables
export PYTHON_VERSION="${{ matrix.python_version }}"
export PIP_PROGRESS_BAR=off
export CONDA_QUIET=1
export CUDA_TESTS_ONLY="0"
unset CUDA_VERSION

Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/unittest-linux-gpu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ jobs:
set -ex
# Set up Environment Variables
export PYTHON_VERSION="${{ matrix.python_version }}"
export PIP_PROGRESS_BAR=off
export CONDA_QUIET=1
export CU_VERSION="${{ matrix.cuda_arch_version }}"
export CUDATOOLKIT="pytorch-cuda=${CU_VERSION}"
export TORCHAUDIO_TEST_ALLOW_SKIP_IF_CUDA_SMALL_MEMORY=true
Expand Down
98 changes: 53 additions & 45 deletions .github/workflows/unittest-windows-cpu.yml
Original file line number Diff line number Diff line change
@@ -1,52 +1,60 @@
# name: Unittests on Windows CPU

# on:
# pull_request:
# push:
# branches:
# - nightly
# - main
# - release/*
# workflow_dispatch:
on:
pull_request:
push:
branches:
- nightly
- main
- release/*
workflow_dispatch:

# jobs:
# unittests-windows-cpu:
# uses: pytorch/test-infra/.github/workflows/windows_job.yml@main
# with:
# repository: pytorch/audio
# runner: windows.4xlarge
# timeout: 180
# script: |
# # Mark Build Directory Safe
# git config --global --add safe.directory /__w/audio/audio
jobs:
unittests-windows-cpu:
uses: pytorch/test-infra/.github/workflows/windows_job.yml@main
with:
repository: pytorch/audio
runner: windows.4xlarge
timeout: 180
script: |
# Mark Build Directory Safe
git config --global --add safe.directory /__w/audio/audio

# # Set up Environment Variables
# export PYTHON_VERSION="3.9"
# unset CUDA_VERSION
# Set up Environment Variables
export PYTHON_VERSION="3.10"
export PIP_PROGRESS_BAR=off
export CONDA_QUIET=1
unset CUDA_VERSION

# # Set CHANNEL
# if [[(${GITHUB_EVENT_NAME} = 'pull_request' && (${GITHUB_BASE_REF} = 'release'*)) || (${GITHUB_REF} = 'refs/heads/release'*) ]]; then
# export UPLOAD_CHANNEL=test
# else
# export UPLOAD_CHANNEL=nightly
# fi
# Set CHANNEL
if [[(${GITHUB_EVENT_NAME} = 'pull_request' && (${GITHUB_BASE_REF} = 'release'*)) || (${GITHUB_REF} = 'refs/heads/release'*) ]]; then
export UPLOAD_CHANNEL=test
else
export UPLOAD_CHANNEL=nightly
fi

# export TORCHAUDIO_TEST_ALLOW_SKIP_IF_NO_CMD_APPLY_CMVN_SLIDING=true
# export TORCHAUDIO_TEST_ALLOW_SKIP_IF_NO_CMD_COMPUTE_FBANK_FEATS=true
# export TORCHAUDIO_TEST_ALLOW_SKIP_IF_NO_CMD_COMPUTE_KALDI_PITCH_FEATS=true
# export TORCHAUDIO_TEST_ALLOW_SKIP_IF_NO_CMD_COMPUTE_MFCC_FEATS=true
# export TORCHAUDIO_TEST_ALLOW_SKIP_IF_NO_CMD_COMPUTE_SPECTROGRAM_FEATS=true
# export TORCHAUDIO_TEST_ALLOW_SKIP_IF_NO_CMD_SOX=true
# export TORCHAUDIO_TEST_ALLOW_SKIP_IF_NO_CUDA=true
# export TORCHAUDIO_TEST_ALLOW_SKIP_IF_NO_HW_ACCEL=true
# export TORCHAUDIO_TEST_ALLOW_SKIP_IF_NO_KALDI=true
# export TORCHAUDIO_TEST_ALLOW_SKIP_IF_NO_SOX=true
# export TORCHAUDIO_TEST_ALLOW_SKIP_IF_ON_PYTHON_310=true
# export TORCHAUDIO_TEST_ALLOW_SKIP_IF_NO_MOD_sentencepiece=true
# export TORCHAUDIO_TEST_ALLOW_SKIP_IF_NO_AUDIO_OUT_DEVICE=true
# export TORCHAUDIO_TEST_ALLOW_SKIP_IF_NO_MACOS=true
# export TORCHAUDIO_TEST_ALLOW_SKIP_IF_TEMPORARY_DISABLED=true
export TORCHAUDIO_TEST_ALLOW_SKIP_IF_NO_CMD_APPLY_CMVN_SLIDING=true
export TORCHAUDIO_TEST_ALLOW_SKIP_IF_NO_CMD_COMPUTE_FBANK_FEATS=true
export TORCHAUDIO_TEST_ALLOW_SKIP_IF_NO_CMD_COMPUTE_KALDI_PITCH_FEATS=true
export TORCHAUDIO_TEST_ALLOW_SKIP_IF_NO_CMD_COMPUTE_MFCC_FEATS=true
export TORCHAUDIO_TEST_ALLOW_SKIP_IF_NO_CMD_COMPUTE_SPECTROGRAM_FEATS=true
export TORCHAUDIO_TEST_ALLOW_SKIP_IF_NO_CMD_SOX=true
export TORCHAUDIO_TEST_ALLOW_SKIP_IF_NO_CUDA=true
export TORCHAUDIO_TEST_ALLOW_SKIP_IF_NO_HW_ACCEL=true
export TORCHAUDIO_TEST_ALLOW_SKIP_IF_NO_KALDI=true
export TORCHAUDIO_TEST_ALLOW_SKIP_IF_NO_SOX=true
export TORCHAUDIO_TEST_ALLOW_SKIP_IF_ON_PYTHON_310=true
export TORCHAUDIO_TEST_ALLOW_SKIP_IF_NO_MOD_sentencepiece=true
export TORCHAUDIO_TEST_ALLOW_SKIP_IF_NO_AUDIO_OUT_DEVICE=true
export TORCHAUDIO_TEST_ALLOW_SKIP_IF_NO_MACOS=true
export TORCHAUDIO_TEST_ALLOW_SKIP_IF_TEMPORARY_DISABLED=true
export TORCHAUDIO_TEST_ALLOW_SKIP_IF_NO_QUANTIZATION=true
export TORCHAUDIO_TEST_ALLOW_SKIP_IF_NO_CTC_DECODER=true
export TORCHAUDIO_TEST_ALLOW_SKIP_IF_NO_MOD_unidecode=true
export TORCHAUDIO_TEST_ALLOW_SKIP_IF_NO_MOD_inflect=true
export TORCHAUDIO_TEST_ALLOW_SKIP_IF_NO_MOD_pytorch_lightning=true
export TORCHAUDIO_TEST_ALLOW_SKIP_IF_NO_MOD_sentencepiece=true

# .github/scripts/unittest-windows/setup_env.sh
# .github/scripts/unittest-windows/install.sh
# .github/scripts/unittest-windows/run_test.sh
.github/scripts/unittest-windows/setup_env.sh
.github/scripts/unittest-windows/install.sh
.github/scripts/unittest-windows/run_test.sh
101 changes: 55 additions & 46 deletions .github/workflows/unittest-windows-gpu.yml
Original file line number Diff line number Diff line change
@@ -1,52 +1,61 @@
# name: Unittests on Windows GPU
name: Unittests on Windows GPU

# on:
# pull_request:
# push:
# branches:
# - nightly
# - main
# - release/*
# workflow_dispatch:
on:
pull_request:
push:
branches:
- nightly
- main
- release/*
workflow_dispatch:

# jobs:
# unittests-windows-gpu:
# uses: pytorch/test-infra/.github/workflows/windows_job.yml@main
# with:
# repository: pytorch/audio
# runner: windows.g5.4xlarge.nvidia.gpu
# timeout: 360
# script: |
# # Mark Build Directory Safe
# git config --global --add safe.directory /__w/audio/audio
jobs:
unittests-windows-gpu:
uses: pytorch/test-infra/.github/workflows/windows_job.yml@main
with:
repository: pytorch/audio
runner: windows.g5.4xlarge.nvidia.gpu
timeout: 360
script: |
# Mark Build Directory Safe
git config --global --add safe.directory /__w/audio/audio

# # Set up Environment Variables
# export PYTHON_VERSION="3.9"
# export CUDA_VERSION=12.6
# Set up Environment Variables
export PYTHON_VERSION="3.10"
export CUDA_VERSION=12.6
export PIP_PROGRESS_BAR=off
export CONDA_QUIET=1
export USE_CUDA=1
export CUBLAS_WORKSPACE_CONFIG=:4096:8

# # Set CHANNEL
# if [[(${GITHUB_EVENT_NAME} = 'pull_request' && (${GITHUB_BASE_REF} = 'release'*)) || (${GITHUB_REF} = 'refs/heads/release'*) ]]; then
# export UPLOAD_CHANNEL=test
# else
# export UPLOAD_CHANNEL=nightly
# fi
# Set CHANNEL
if [[(${GITHUB_EVENT_NAME} = 'pull_request' && (${GITHUB_BASE_REF} = 'release'*)) || (${GITHUB_REF} = 'refs/heads/release'*) ]]; then
export UPLOAD_CHANNEL=test
else
export UPLOAD_CHANNEL=nightly
fi

# export TORCHAUDIO_TEST_ALLOW_SKIP_IF_NO_CMD_APPLY_CMVN_SLIDING=true
# export TORCHAUDIO_TEST_ALLOW_SKIP_IF_NO_CMD_COMPUTE_FBANK_FEATS=true
# export TORCHAUDIO_TEST_ALLOW_SKIP_IF_NO_CMD_COMPUTE_KALDI_PITCH_FEATS=true
# export TORCHAUDIO_TEST_ALLOW_SKIP_IF_NO_CMD_COMPUTE_MFCC_FEATS=true
# export TORCHAUDIO_TEST_ALLOW_SKIP_IF_NO_CMD_COMPUTE_SPECTROGRAM_FEATS=true
# export TORCHAUDIO_TEST_ALLOW_SKIP_IF_NO_CMD_SOX=true
# export TORCHAUDIO_TEST_ALLOW_SKIP_IF_NO_KALDI=true
# export TORCHAUDIO_TEST_ALLOW_SKIP_IF_NO_SOX=true
# export TORCHAUDIO_TEST_ALLOW_SKIP_IF_ON_PYTHON_310=true
# export TORCHAUDIO_TEST_ALLOW_SKIP_IF_NO_MOD_sentencepiece=true
# export TORCHAUDIO_TEST_ALLOW_SKIP_IF_NO_AUDIO_OUT_DEVICE=true
# export TORCHAUDIO_TEST_ALLOW_SKIP_IF_NO_MACOS=true
# export TORCHAUDIO_TEST_ALLOW_SKIP_IF_CUDA_SMALL_MEMORY=true
# export TORCHAUDIO_TEST_ALLOW_SKIP_IF_TEMPORARY_DISABLED=true
export TORCHAUDIO_TEST_ALLOW_SKIP_IF_NO_CMD_APPLY_CMVN_SLIDING=true
export TORCHAUDIO_TEST_ALLOW_SKIP_IF_NO_CMD_COMPUTE_FBANK_FEATS=true
export TORCHAUDIO_TEST_ALLOW_SKIP_IF_NO_CMD_COMPUTE_KALDI_PITCH_FEATS=true
export TORCHAUDIO_TEST_ALLOW_SKIP_IF_NO_CMD_COMPUTE_MFCC_FEATS=true
export TORCHAUDIO_TEST_ALLOW_SKIP_IF_NO_CMD_COMPUTE_SPECTROGRAM_FEATS=true
export TORCHAUDIO_TEST_ALLOW_SKIP_IF_NO_CMD_SOX=true
export TORCHAUDIO_TEST_ALLOW_SKIP_IF_NO_KALDI=true
export TORCHAUDIO_TEST_ALLOW_SKIP_IF_NO_SOX=true
export TORCHAUDIO_TEST_ALLOW_SKIP_IF_ON_PYTHON_310=true
export TORCHAUDIO_TEST_ALLOW_SKIP_IF_NO_MOD_sentencepiece=true
export TORCHAUDIO_TEST_ALLOW_SKIP_IF_NO_AUDIO_OUT_DEVICE=true
export TORCHAUDIO_TEST_ALLOW_SKIP_IF_NO_MACOS=true
export TORCHAUDIO_TEST_ALLOW_SKIP_IF_CUDA_SMALL_MEMORY=true
export TORCHAUDIO_TEST_ALLOW_SKIP_IF_TEMPORARY_DISABLED=true
export TORCHAUDIO_TEST_ALLOW_SKIP_IF_NO_QUANTIZATION=true
export TORCHAUDIO_TEST_ALLOW_SKIP_IF_NO_CTC_DECODER=true
export TORCHAUDIO_TEST_ALLOW_SKIP_IF_NO_MOD_unidecode=true
export TORCHAUDIO_TEST_ALLOW_SKIP_IF_NO_MOD_inflect=true
export TORCHAUDIO_TEST_ALLOW_SKIP_IF_NO_MOD_pytorch_lightning=true
export TORCHAUDIO_TEST_ALLOW_SKIP_IF_NO_MOD_sentencepiece=true


# .github/scripts/unittest-windows/setup_env.sh
# .github/scripts/unittest-windows/install.sh
# .github/scripts/unittest-windows/run_test.sh
.github/scripts/unittest-windows/setup_env.sh
.github/scripts/unittest-windows/install.sh
.github/scripts/unittest-windows/run_test.sh
Loading