Commit 6425d46c authored by Omkar Salpekar's avatar Omkar Salpekar Committed by Facebook GitHub Bot
Browse files

[Nova] Windows CPU Unittests on Nova (#3329)

Summary:
Continuing with the job migrations from CCI to Nova, this PR introduces the Windows CPU Unittest job as a Nova workflow.

The job is passing: https://github.com/pytorch/audio/actions/runs/5094569687/jobs/9159020192?pr=3329.

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

Reviewed By: huydhn

Differential Revision: D46265649

Pulled By: atalman

fbshipit-source-id: 7659dfbcc8ad400f2e109ff64530e1f768e82ef9
parent af932cc7
......@@ -5,7 +5,7 @@ unset PYTORCH_VERSION
# so no need to set PYTORCH_VERSION.
# In fact, keeping PYTORCH_VERSION forces us to hardcode PyTorch version in config.
set -ex
set -euxo pipefail
root_dir="$(git rev-parse --show-toplevel)"
conda_dir="${root_dir}/conda"
......@@ -43,6 +43,9 @@ if [ ! -z "${CUDA_VERSION:-}" ] ; then
fi
# 2. Install torchaudio
printf "* Installing fsspec\n"
pip install --trusted-host pypi.org --trusted-host files.pythonhosted.org fsspec
printf "* Installing torchaudio\n"
"$root_dir/packaging/vc_env_helper.bat" python setup.py install
......@@ -64,7 +67,6 @@ case "$(python --version)" in
esac
# Note: installing librosa via pip fail because it will try to compile numba.
(
set -x
conda install -y -c conda-forge ${NUMBA_DEV_CHANNEL} 'librosa==0.10.0' parameterized 'requests>=2.20'
# Need to disable shell check since this'll fail out if SENTENCEPIECE_DEPENDENCY is empty
# shellcheck disable=SC2086
......
#!/usr/bin/env bash
set -ex
set -euxo pipefail
eval "$(./conda/Scripts/conda.exe 'shell.bash' 'hook')"
conda activate ./env
......
#!/usr/bin/env bash
set -ex
set -euxo pipefail
echo CU_VERSION is "${CU_VERSION}"
echo CUDA_VERSION is "${CUDA_VERSION}"
# Currenly, CU_VERSION and CUDA_VERSION are not consistent.
# to understand this code, please checck out https://github.com/pytorch/vision/issues/4443
version="cpu"
if [[ ! -z "${CUDA_VERSION}" ]] ; then
version="$CUDA_VERSION"
if [ -z "${CUDA_VERSION:-}" ] ; then
version="cpu"
else
if [[ ${#CU_VERSION} -eq 5 ]]; then
version="${CU_VERSION:2:2}.${CU_VERSION:4:1}"
fi
version="$CUDA_VERSION"
fi
# Don't use if [[ "$version" == "cpu" ]]; then exit 0 fi.
......
......@@ -5,7 +5,7 @@
#
# Do not install PyTorch and torchaudio here, otherwise they also get cached.
set -e
set -euxo pipefail
this_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
root_dir="$(git rev-parse --show-toplevel)"
......
name: Unittests on Windows CPU
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
# Set up Environment Variables
export PYTHON_VERSION="3.8"
export USE_FFMPEG="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
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
./.circleci/unittest/windows/scripts/setup_env.sh
./.circleci/unittest/windows/scripts/install.sh
./.circleci/unittest/windows/scripts/run_test.sh
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