pytorch / audio

Data manipulation and transformation for audio signal processing, powered by PyTorch
https://pytorch.org/audio
BSD 2-Clause "Simplified" License
2.55k stars 657 forks source link

[CODEMOD][pytorch] replace uses of np.ndarray with npt.NDArray (#3845) #3846

Closed igorsugak closed 1 month ago

igorsugak commented 1 month ago

Summary: X-link: https://github.com/pytorch/opacus/pull/680 X-link: https://github.com/pytorch/captum/pull/1387 X-link: https://github.com/pytorch/botorch/pull/2584

This replaces uses of numpy.ndarray in type annotations with numpy.typing.NDArray. In Numpy-1.24.0+ numpy.ndarray is annotated as generic type. Without template parameters it triggers static analysis errors:

Generic type `ndarray` expects 2 type parameters.

numpy.typing.NDArray is an alias that provides default template parameters.

Differential Revision: D64619891

pytorch-bot[bot] commented 1 month ago

:link: Helpful Links

:test_tube: See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/audio/3846

Note: Links to docs will display an error until the docs builds have been completed.

:x: 3 New Failures, 1 Cancelled Job, 12 Unrelated Failures

As of commit 6a59e92035caa2bd2c6ad330bd85320d78cc8cf6 with merge base 79047bf6bdec9e32c4cffd0f9835b347781fefbf (image):

NEW FAILURES - The following jobs have failed:

* [Integration Test / build (3.8)](https://hud.pytorch.org/pr/pytorch/audio/3846#31752853961) ([gh](https://github.com/pytorch/audio/actions/runs/11410472785/job/31752853961)) `subprocess.CalledProcessError: Command '['cmake', '/home/runner/work/audio/audio', '-DCMAKE_BUILD_TYPE=Release', '-DCMAKE_PREFIX_PATH=/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/torch/share/cmake', '-DCMAKE_INSTALL_PREFIX=/home/runner/work/audio/audio/build/lib.linux-x86_64-cpython-38/', '-DCMAKE_VERBOSE_MAKEFILE=ON', '-DPython_INCLUDE_DIR=/opt/hostedtoolcache/Python/3.8.18/x64/include/python3.8', '-DBUILD_CPP_TEST=OFF', '-DBUILD_SOX:BOOL=ON', '-DBUILD_RIR:BOOL=ON', '-DBUILD_RNNT:BOOL=ON', '-DBUILD_ALIGN:BOOL=ON', '-DBUILD_CUDA_CTC_DECODER:BOOL=ON', '-DBUILD_TORCHAUDIO_PYTHON_EXTENSION:BOOL=ON', '-DBUILD_TORIO_PYTHON_EXTENSION:BOOL=ON', '-DUSE_ROCM:BOOL=OFF', '-DUSE_CUDA:BOOL=ON', '-DUSE_OPENMP:BOOL=ON', '-DUSE_FFMPEG:BOOL=ON', '-GNinja']' returned non-zero exit status 1.` * [Unit-tests on Linux GPU / tests (3.10, 11.8) / linux-job](https://hud.pytorch.org/pr/pytorch/audio/3846#31752854627) ([gh](https://github.com/pytorch/audio/actions/runs/11410472835/job/31752854627)) `RuntimeError: Command docker exec -t 010511b5479b34eab9d0281d42255bec430c074ea87f95f37cfd4533ef5cf144 /exec failed with exit code 2` * [Unit-tests on Linux GPU / tests (3.9, 11.8) / linux-job](https://hud.pytorch.org/pr/pytorch/audio/3846#31752855271) ([gh](https://github.com/pytorch/audio/actions/runs/11410472835/job/31752855271)) `RuntimeError: Command docker exec -t b2ffce53888a66c72800ba3bd5c0ed8cc619d12441d7c632895f5f0839184bd3 /exec failed with exit code 2`

CANCELLED JOB - The following job was cancelled. Please retry:

* [Unit-tests on Linux GPU / tests (3.8, 11.8) / linux-job](https://hud.pytorch.org/pr/pytorch/audio/3846#31752854882) ([gh](https://github.com/pytorch/audio/actions/runs/11410472835/job/31752854882)) `##[error]The operation was canceled.`

BROKEN TRUNK - The following jobs failed but were present on the merge base:

👉 Rebase onto the `viable/strict` branch to avoid these failures

* [Build Windows Conda / pytorch/audio / upload / conda-py3_9-cuda11_8](https://hud.pytorch.org/pr/pytorch/audio/3846#31754129752) ([gh](https://github.com/pytorch/audio/actions/runs/11410472890/job/31754129752)) ([trunk failure](https://hud.pytorch.org/pytorch/audio/commit/79047bf6bdec9e32c4cffd0f9835b347781fefbf#31704253673)) `##[error]Unable to find an artifact with the name: pytorch_audio__3.9_cu118_` * [Build Windows Conda / pytorch/audio / upload / conda-py3_9-cuda12_1](https://hud.pytorch.org/pr/pytorch/audio/3846#31754129884) ([gh](https://github.com/pytorch/audio/actions/runs/11410472890/job/31754129884)) ([trunk failure](https://hud.pytorch.org/pytorch/audio/commit/79047bf6bdec9e32c4cffd0f9835b347781fefbf#31704253865)) `##[error]Unable to find an artifact with the name: pytorch_audio__3.9_cu121_` * [Build Windows Conda / pytorch/audio / upload / conda-py3_9-cuda12_4](https://hud.pytorch.org/pr/pytorch/audio/3846#31754130026) ([gh](https://github.com/pytorch/audio/actions/runs/11410472890/job/31754130026)) ([trunk failure](https://hud.pytorch.org/pytorch/audio/commit/79047bf6bdec9e32c4cffd0f9835b347781fefbf#31704254010)) `##[error]Unable to find an artifact with the name: pytorch_audio__3.9_cu124_` * [Build Windows Wheels / pytorch/audio / upload / wheel-py3_9-cuda11_8](https://hud.pytorch.org/pr/pytorch/audio/3846#31757874625) ([gh](https://github.com/pytorch/audio/actions/runs/11410472863/job/31757874625)) ([trunk failure](https://hud.pytorch.org/pytorch/audio/commit/79047bf6bdec9e32c4cffd0f9835b347781fefbf#31706701942)) `##[error]Unable to find an artifact with the name: pytorch_audio__3.9_cu118_` * [Build Windows Wheels / pytorch/audio / upload / wheel-py3_9-cuda12_1](https://hud.pytorch.org/pr/pytorch/audio/3846#31757874784) ([gh](https://github.com/pytorch/audio/actions/runs/11410472863/job/31757874784)) ([trunk failure](https://hud.pytorch.org/pytorch/audio/commit/79047bf6bdec9e32c4cffd0f9835b347781fefbf#31706702143)) `##[error]Unable to find an artifact with the name: pytorch_audio__3.9_cu121_` * [Build Windows Wheels / pytorch/audio / upload / wheel-py3_9-cuda12_4](https://hud.pytorch.org/pr/pytorch/audio/3846#31757874950) ([gh](https://github.com/pytorch/audio/actions/runs/11410472863/job/31757874950)) ([trunk failure](https://hud.pytorch.org/pytorch/audio/commit/79047bf6bdec9e32c4cffd0f9835b347781fefbf#31706702374)) `##[error]Unable to find an artifact with the name: pytorch_audio__3.9_cu124_` * [Unit-tests on Linux CPU / tests (3.10) / linux-job](https://hud.pytorch.org/pr/pytorch/audio/3846#31752854891) ([gh](https://github.com/pytorch/audio/actions/runs/11410472852/job/31752854891)) ([trunk failure](https://hud.pytorch.org/pytorch/audio/commit/79047bf6bdec9e32c4cffd0f9835b347781fefbf#31703206917)) `##[error]The operation was canceled.` * [Unit-tests on Linux CPU / tests (3.8) / linux-job](https://hud.pytorch.org/pr/pytorch/audio/3846#31752855270) ([gh](https://github.com/pytorch/audio/actions/runs/11410472852/job/31752855270)) ([trunk failure](https://hud.pytorch.org/pytorch/audio/commit/79047bf6bdec9e32c4cffd0f9835b347781fefbf#31703207241)) `##[error]The operation was canceled.` * [Unit-tests on Linux CPU / tests (3.9) / linux-job](https://hud.pytorch.org/pr/pytorch/audio/3846#31752855558) ([gh](https://github.com/pytorch/audio/actions/runs/11410472852/job/31752855558)) ([trunk failure](https://hud.pytorch.org/pytorch/audio/commit/79047bf6bdec9e32c4cffd0f9835b347781fefbf#31703207591)) `##[error]The operation was canceled.` * [Unit-tests on Macos CPU / tests / macos-job](https://hud.pytorch.org/pr/pytorch/audio/3846#31752854327) ([gh](https://github.com/pytorch/audio/actions/runs/11410472824/job/31752854327)) ([trunk failure](https://hud.pytorch.org/pytorch/audio/commit/79047bf6bdec9e32c4cffd0f9835b347781fefbf#31703206774)) `torchaudio_unittest/prototype/functional/pyroomacoustics_compatibility_test.py::CompatibilityTest::test_simulate_rir_ism_single_band_1` * [Unittests on Windows CPU / unittests-windows-cpu / windows-job](https://hud.pytorch.org/pr/pytorch/audio/3846#31752854570) ([gh](https://github.com/pytorch/audio/actions/runs/11410472846/job/31752854570)) ([trunk failure](https://hud.pytorch.org/pytorch/audio/commit/79047bf6bdec9e32c4cffd0f9835b347781fefbf#31703206616)) `torchaudio_unittest\prototype\functional\pyroomacoustics_compatibility_test.py::CompatibilityTest::test_simulate_rir_ism_single_band_1` * [Unittests on Windows GPU / unittests-windows-gpu / windows-job](https://hud.pytorch.org/pr/pytorch/audio/3846#31752854418) ([gh](https://github.com/pytorch/audio/actions/runs/11410472815/job/31752854418)) ([trunk failure](https://hud.pytorch.org/pytorch/audio/commit/79047bf6bdec9e32c4cffd0f9835b347781fefbf#31703206710)) `torchaudio_unittest\prototype\functional\pyroomacoustics_compatibility_test.py::CompatibilityTest::test_simulate_rir_ism_single_band_1`

This comment was automatically generated by Dr. CI and updates every 15 minutes.

facebook-github-bot commented 1 month ago

This pull request was exported from Phabricator. Differential Revision: D64619891