pytorch/test
Xuehai Pan 4dce5b71a0 [build] modernize build-frontend: python setup.py develop/install -> [uv ]pip install --no-build-isolation [-e ]. (#156027)
Modernize the development installation:

```bash
# python setup.py develop
python -m pip install --no-build-isolation -e .

# python setup.py install
python -m pip install --no-build-isolation .
```

Now, the `python setup.py develop` is a wrapper around `python -m pip install -e .` since `setuptools>=80.0`:

- pypa/setuptools#4955

`python setup.py install` is deprecated and will emit a warning during run. The warning will become an error on October 31, 2025.

- 9c4d383631/setuptools/command/install.py (L58-L67)

> ```python
> SetuptoolsDeprecationWarning.emit(
>     "setup.py install is deprecated.",
>     """
>     Please avoid running ``setup.py`` directly.
>     Instead, use pypa/build, pypa/installer or other
>     standards-based tools.
>     """,
>     see_url="https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html",
>     due_date=(2025, 10, 31),
> )
> ```

- pypa/setuptools#3849

Additional Resource:

- [Why you shouldn't invoke setup.py directly](https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html)

Pull Request resolved: https://github.com/pytorch/pytorch/pull/156027
Approved by: https://github.com/ezyang
2025-07-09 11:24:27 +00:00
..
ao/sparsity [BE][PYFMT] migrate PYFMT for test/[a-h]*/ to ruff format (#144555) 2025-06-24 04:53:54 +00:00
autograd
backends/xeon
benchmark_utils [BE][PYFMT] migrate PYFMT for test/[a-h]*/ to ruff format (#144555) 2025-06-24 04:53:54 +00:00
bottleneck_test
compiled_autograd_skips [ca] skip on some PYTORCH_TEST_WITH_DYNAMO=1 autograd tests (#156374) 2025-06-21 18:33:38 +00:00
cpp [build] modernize build-frontend: python setup.py develop/install -> [uv ]pip install --no-build-isolation [-e ]. (#156027) 2025-07-09 11:24:27 +00:00
cpp_api_parity [BE][PYFMT] migrate PYFMT for test/[a-h]*/ to ruff format (#144555) 2025-06-24 04:53:54 +00:00
cpp_extensions [build] modernize build-frontend: python setup.py develop/install -> [uv ]pip install --no-build-isolation [-e ]. (#156027) 2025-07-09 11:24:27 +00:00
custom_backend [Cmake] Make PyTorch buildable by CMake-4.x (#150203) 2025-03-29 01:39:13 +00:00
custom_operator [Cmake] Make PyTorch buildable by CMake-4.x (#150203) 2025-03-29 01:39:13 +00:00
distributed Fixes typo in nccl_window_registration test (#157293) 2025-07-09 11:01:18 +00:00
distributions Use property instead of ClassVar for Uniform.arg_constraints and Wishart.arg_constraints (#154361) 2025-05-26 17:48:28 +00:00
dynamo [c10d] support dynamic shapes for all_to_all_single_autograd (#157521) 2025-07-08 23:19:59 +00:00
dynamo_expected_failures [list] Add list.__delitem__ (#156339) 2025-07-07 14:51:32 +00:00
dynamo_skips Add CPython dict tests (#150791) 2025-05-30 18:17:09 +00:00
error_messages
expect Add flag to fx.passes.split_module to normalize input names (#157733) 2025-07-08 13:47:24 +00:00
export [export] Fix lift constants bug (#157719) 2025-07-08 20:33:53 +00:00
forward_backward_compatibility [BE][PYFMT] migrate PYFMT for test/[a-h]*/ to ruff format (#144555) 2025-06-24 04:53:54 +00:00
functorch Add isnan exit condition to special ops (#157464) 2025-07-05 04:19:50 +00:00
fx [BE][PYFMT] migrate PYFMT for test/[a-h]*/ to ruff format (#144555) 2025-06-24 04:53:54 +00:00
higher_order_ops [invoke_subgraph][partitioner] Add meta val on run_and_save_rng ops (#157319) 2025-07-01 21:02:08 +00:00
inductor [inductor] fix tensor.to(uint8) error when tensor src type is float (#157267) 2025-07-09 07:03:38 +00:00
inductor_expected_failures [dynamo] Support Tensor subclass that has dynamic attributes or calls Parameter.__torch_function__ (#149482) 2025-04-02 20:56:43 +00:00
inductor_skips [BE] Remove test_ops from FIXME_inductor_dont_reset_dynamo (#145307) 2025-01-27 18:12:39 +00:00
jit Fix typo: 'initalized' → 'initialized' in alias analysis test (#157628) 2025-07-04 13:41:53 +00:00
jit_hooks [Cmake] Make PyTorch buildable by CMake-4.x (#150203) 2025-03-29 01:39:13 +00:00
lazy Add __main__ guards to tests (#154716) 2025-06-04 14:38:13 +00:00
mobile Fix typo: 'occurances' → 'occurrences' in mobile model test (#157629) 2025-07-05 01:36:42 +00:00
nn Add max_pool3d backward pass for MPS (#157498) 2025-07-07 19:46:44 +00:00
onnx [ONNX] Fix conversion of attention - 4D (#157130) 2025-07-02 18:05:10 +00:00
optim [BE][PYFMT] migrate PYFMT for {torch,test}/{nn,optim}/** to ruff format (#144548) 2025-06-14 11:27:04 +00:00
package Preserve GrpahModule node stack trace after torch package deserializaion re-tracing (#155638) 2025-06-12 03:48:27 +00:00
profiler Inductor logging + analysis of torch.profile (#149697) 2025-07-07 22:13:34 +00:00
quantization Fix typo: 'paramter' → 'parameter' in quantization model report test (#157646) 2025-07-05 12:28:36 +00:00
scripts
strobelight/examples Enable strobelight profiling specific compile frame ids using COMPILE_STROBELIGHT_FRAME_FILTER (#147549) 2025-02-22 03:44:53 +00:00
test_img
torch_np [BE] Raise NotImplementedError (#155470) 2025-06-13 22:07:03 +00:00
typing More testing of Python arithmetic operators between tensors and scalars (see 157266) (#157632) 2025-07-05 17:48:27 +00:00
xpu [Intel GPU] fix matmul accuracy when offset > 0 (#154495) 2025-05-30 09:53:51 +00:00
_test_bazel.py
allowlist_for_publicAPI.json [export] Move PT2ArchiveWriter/Reader to torch/export (#153795) 2025-05-23 19:04:36 +00:00
bench_mps_ops.py [MPS] Add benchmark for scan with indices (#156860) 2025-06-26 18:44:16 +00:00
conftest.py [CI][run_test] Fix rerun logic for failing at exit (#155853) 2025-06-17 17:51:40 +00:00
create_dummy_torchscript_model.py
HowToWriteTestsUsingFileCheck.md
linear.py
load_torchscript_model.py
minioptest_failures_dict.json
mkl_verbose.py
mkldnn_verbose.py
pytest_shard_custom.py
run_doctests.sh
run_test.py [build] modernize build-frontend: python setup.py develop/install -> [uv ]pip install --no-build-isolation [-e ]. (#156027) 2025-07-09 11:24:27 +00:00
simulate_nccl_errors.py [BE]: Update ruff to 0.11.8 (#153249) 2025-05-12 18:30:52 +00:00
slow_tests.json Update slow tests (#157696) 2025-07-07 12:09:06 +00:00
test_accelerator.py [Easy] Fix the function signature of torch.Event (#151221) 2025-04-26 13:51:56 +00:00
test_ao_sparsity.py Add __main__ guards to ao tests (#154612) 2025-06-10 18:33:09 +00:00
test_appending_byte_serializer.py Check integrity of bytes in AppendingByteSerializer (#152139) 2025-04-26 18:10:58 +00:00
test_autocast.py Enable TemporaryFileName tests on Windows (#146311) 2025-02-07 06:06:18 +00:00
test_autograd_fallback.py
test_autograd.py [BE][2/6] fix typos in test/ (test/test_*.py) (#157636) 2025-07-09 11:02:23 +00:00
test_autoload.py
test_binary_ufuncs.py [BE][2/6] fix typos in test/ (test/test_*.py) (#157636) 2025-07-09 11:02:23 +00:00
test_bundled_images.py Add __main__ guards to tests (#154716) 2025-06-04 14:38:13 +00:00
test_bundled_inputs.py
test_ci_sanity_check_fail.py
test_comparison_utils.py
test_compile_benchmark_util.py
test_complex.py
test_content_store.py torch.utils._content_store: fix error in hash_storage on XPU (#147785) 2025-02-26 23:57:59 +00:00
test_cpp_api_parity.py Enable C++ API parity tests on AArch64 (#145370) 2025-01-30 22:42:49 +00:00
test_cpp_extensions_aot.py [build] modernize build-frontend: python setup.py develop/install -> [uv ]pip install --no-build-isolation [-e ]. (#156027) 2025-07-09 11:24:27 +00:00
test_cpp_extensions_jit.py [BE][2/6] fix typos in test/ (test/test_*.py) (#157636) 2025-07-09 11:02:23 +00:00
test_cpp_extensions_mtia_backend.py Revert "Generalize poison fork logic for each device backend (#144664)" 2025-04-10 21:02:14 +00:00
test_cpp_extensions_open_device_registration.py [OpenReg][2/N] Migrate cpp_extensions_open_device_registration to OpenReg (#156589) 2025-06-26 03:59:50 +00:00
test_cpp_extensions_stream_and_event.py [Easy] Add more check for elapsedTime of torch.xxx.Event and torch.Event (#151404) 2025-04-25 20:15:04 +00:00
test_cuda_expandable_segments.py
test_cuda_multigpu.py [BE][2/6] fix typos in test/ (test/test_*.py) (#157636) 2025-07-09 11:02:23 +00:00
test_cuda_nvml_based_avail.py [BE][2/6] fix typos in test/ (test/test_*.py) (#157636) 2025-07-09 11:02:23 +00:00
test_cuda_primary_ctx.py [BE][2/6] fix typos in test/ (test/test_*.py) (#157636) 2025-07-09 11:02:23 +00:00
test_cuda_sanitizer.py
test_cuda_trace.py
test_cuda.py [BE][2/6] fix typos in test/ (test/test_*.py) (#157636) 2025-07-09 11:02:23 +00:00
test_custom_ops.py [BE][2/6] fix typos in test/ (test/test_*.py) (#157636) 2025-07-09 11:02:23 +00:00
test_dataloader.py [BE][2/6] fix typos in test/ (test/test_*.py) (#157636) 2025-07-09 11:02:23 +00:00
test_datapipe.py [BE][2/6] fix typos in test/ (test/test_*.py) (#157636) 2025-07-09 11:02:23 +00:00
test_decomp.py [BE][2/6] fix typos in test/ (test/test_*.py) (#157636) 2025-07-09 11:02:23 +00:00
test_deploy.py
test_determination.py
test_dispatch.py Typo fixes for "overridden" in comments and function names (#155944) 2025-06-14 03:37:38 +00:00
test_dlpack.py Upgrade to DLPack 1.0. (#145000) 2025-06-30 16:58:06 +00:00
test_dynamic_shapes.py [BE][2/6] fix typos in test/ (test/test_*.py) (#157636) 2025-07-09 11:02:23 +00:00
test_expanded_weights.py Move non inductor workflows cuda 12.6->cuda 12.8 (#155234) 2025-06-12 12:42:34 +00:00
test_extension_utils.py Move privateuse1 test out of test_utils and make them serial (#145380) 2025-01-23 00:31:39 +00:00
test_fake_tensor.py [BE][2/6] fix typos in test/ (test/test_*.py) (#157636) 2025-07-09 11:02:23 +00:00
test_file_check.py
test_flop_counter.py PYFMT lint grandfathered files 1 (#154261) 2025-05-25 17:36:14 +00:00
test_foreach.py Stop skipping entire foreach tests, just skip the profiler portion (#156871) 2025-06-27 22:35:34 +00:00
test_function_schema.py
test_functional_autograd_benchmark.py Enable Windows tests (#146666) 2025-02-08 00:55:20 +00:00
test_functional_optim.py
test_functionalization_of_rng_ops.py [BE][2/6] fix typos in test/ (test/test_*.py) (#157636) 2025-07-09 11:02:23 +00:00
test_functionalization.py [BE][2/6] fix typos in test/ (test/test_*.py) (#157636) 2025-07-09 11:02:23 +00:00
test_futures.py
test_fx_experimental.py Add flag to fx.passes.split_module to normalize input names (#157733) 2025-07-08 13:47:24 +00:00
test_fx_passes.py [BE][2/6] fix typos in test/ (test/test_*.py) (#157636) 2025-07-09 11:02:23 +00:00
test_fx_reinplace_pass.py [BE][2/6] fix typos in test/ (test/test_*.py) (#157636) 2025-07-09 11:02:23 +00:00
test_fx.py [BE][2/6] fix typos in test/ (test/test_*.py) (#157636) 2025-07-09 11:02:23 +00:00
test_hop_infra.py Support torch.compile rng selective activation checkpointing with cudagraph (#146878) 2025-02-28 00:47:03 +00:00
test_hub.py Add __main__ guards to tests (#154716) 2025-06-04 14:38:13 +00:00
test_import_stats.py
test_indexing.py [BE][2/6] fix typos in test/ (test/test_*.py) (#157636) 2025-07-09 11:02:23 +00:00
test_itt.py
test_jit_autocast.py [BE][2/6] fix typos in test/ (test/test_*.py) (#157636) 2025-07-09 11:02:23 +00:00
test_jit_disabled.py
test_jit_fuser_legacy.py
test_jit_fuser_te.py [BE][2/6] fix typos in test/ (test/test_*.py) (#157636) 2025-07-09 11:02:23 +00:00
test_jit_fuser.py
test_jit_legacy.py
test_jit_llga_fuser.py
test_jit_profiling.py
test_jit_simple.py
test_jit_string.py PEP585 update - test (#145176) 2025-01-22 04:48:28 +00:00
test_jit.py [BE][2/6] fix typos in test/ (test/test_*.py) (#157636) 2025-07-09 11:02:23 +00:00
test_jiterator.py
test_kernel_launch_checks.py
test_legacy_vmap.py [BE][2/6] fix typos in test/ (test/test_*.py) (#157636) 2025-07-09 11:02:23 +00:00
test_license.py [BE][2/6] fix typos in test/ (test/test_*.py) (#157636) 2025-07-09 11:02:23 +00:00
test_linalg.py [BE][2/6] fix typos in test/ (test/test_*.py) (#157636) 2025-07-09 11:02:23 +00:00
test_logging.py
test_masked.py [BE][2/6] fix typos in test/ (test/test_*.py) (#157636) 2025-07-09 11:02:23 +00:00
test_maskedtensor.py
test_matmul_cuda.py [BE][2/6] fix typos in test/ (test/test_*.py) (#157636) 2025-07-09 11:02:23 +00:00
test_meta.py [BE][2/6] fix typos in test/ (test/test_*.py) (#157636) 2025-07-09 11:02:23 +00:00
test_metal.py
test_mkl_verbose.py
test_mkldnn_fusion.py
test_mkldnn_verbose.py
test_mkldnn.py [BE][2/6] fix typos in test/ (test/test_*.py) (#157636) 2025-07-09 11:02:23 +00:00
test_mobile_optimizer.py
test_model_exports_to_core_aten.py [Codemod][AddExplicitStrictExportForTrainingInferenceArg] caffe2/ (#149595) 2025-04-03 23:50:13 +00:00
test_module_tracker.py
test_modules.py Disable slow gradcheck for nn.Transformer ModuleInfo (#145531) 2025-01-25 00:58:03 +00:00
test_monitor.py
test_mps.py [BE][2/6] fix typos in test/ (test/test_*.py) (#157636) 2025-07-09 11:02:23 +00:00
test_multiprocessing_spawn.py Remove NO_MULTIPROCESSING_SPAWN checks (#146705) 2025-02-28 05:53:19 +00:00
test_multiprocessing.py Revert "[CI] Use setup-python from for Mac tests (#155698)" 2025-06-12 14:42:32 +00:00
test_namedtensor.py
test_namedtuple_return_api.py
test_native_functions.py
test_native_mha.py
test_nestedtensor.py [BE][2/6] fix typos in test/ (test/test_*.py) (#157636) 2025-07-09 11:02:23 +00:00
test_nn.py [BE][2/6] fix typos in test/ (test/test_*.py) (#157636) 2025-07-09 11:02:23 +00:00
test_nnapi.py
test_numba_integration.py Fix broken URLs (#152237) 2025-04-27 09:56:42 +00:00
test_numpy_interop.py Fix segfault during NumPy string tensor conversion (#155364) 2025-06-07 01:55:00 +00:00
test_openmp.py
test_openreg.py [BE][2/6] fix typos in test/ (test/test_*.py) (#157636) 2025-07-09 11:02:23 +00:00
test_ops_fwd_gradients.py
test_ops_gradients.py Enable more nightly tests on s390x (#148452) 2025-03-18 16:09:39 +00:00
test_ops_jit.py [BE][2/6] fix typos in test/ (test/test_*.py) (#157636) 2025-07-09 11:02:23 +00:00
test_ops.py [BE][2/6] fix typos in test/ (test/test_*.py) (#157636) 2025-07-09 11:02:23 +00:00
test_optim.py Fix test/test_optim.py error message. (#153076) 2025-05-07 22:46:05 +00:00
test_out_dtype_op.py
test_overrides.py [BE][2/6] fix typos in test/ (test/test_*.py) (#157636) 2025-07-09 11:02:23 +00:00
test_package.py
test_per_overload_api.py [BE][2/6] fix typos in test/ (test/test_*.py) (#157636) 2025-07-09 11:02:23 +00:00
test_prims.py
test_proxy_tensor.py [attempt 2] Compute contiguity symbolically to avoid dde, and introduce c++ sym_is_contiguous (#157472) 2025-07-02 23:12:29 +00:00
test_pruning_op.py
test_public_bindings.py [BE][2/6] fix typos in test/ (test/test_*.py) (#157636) 2025-07-09 11:02:23 +00:00
test_python_dispatch.py [BE][2/6] fix typos in test/ (test/test_*.py) (#157636) 2025-07-09 11:02:23 +00:00
test_pytree.py Preserve Enum types during torch.export serialization and deserialization (#154821) 2025-06-08 17:30:31 +00:00
test_quantization.py [BE]: Update ruff to 0.11.8 (#153249) 2025-05-12 18:30:52 +00:00
test_reductions.py [BE][2/6] fix typos in test/ (test/test_*.py) (#157636) 2025-07-09 11:02:23 +00:00
test_scatter_gather_ops.py [BE][2/6] fix typos in test/ (test/test_*.py) (#157636) 2025-07-09 11:02:23 +00:00
test_schema_check.py Typo fixes for "overridden" in comments and function names (#155944) 2025-06-14 03:37:38 +00:00
test_segment_reductions.py [BE][2/6] fix typos in test/ (test/test_*.py) (#157636) 2025-07-09 11:02:23 +00:00
test_serialization.py [BE][2/6] fix typos in test/ (test/test_*.py) (#157636) 2025-07-09 11:02:23 +00:00
test_set_default_mobile_cpu_allocator.py
test_shape_ops.py [Quant] flip: throw runtime error for QUInt4x2 and QUInt2x4 input (#147430) 2025-02-25 03:47:40 +00:00
test_show_pickle.py
test_sort_and_select.py [TEST] Modernize test_sort_large (#155546) 2025-06-10 19:59:12 +00:00
test_sparse_csr.py [BE][2/6] fix typos in test/ (test/test_*.py) (#157636) 2025-07-09 11:02:23 +00:00
test_sparse_semi_structured.py ROCm Sparsity through HipSparseLT (#150578) 2025-05-31 02:03:40 +00:00
test_sparse.py [BE][2/6] fix typos in test/ (test/test_*.py) (#157636) 2025-07-09 11:02:23 +00:00
test_spectral_ops.py fix numpy compatibility for 2d small list indices (#154806) 2025-06-04 01:58:52 +00:00
test_stateless.py [BE][2/6] fix typos in test/ (test/test_*.py) (#157636) 2025-07-09 11:02:23 +00:00
test_static_runtime.py
test_subclass.py
test_sympy_utils.py [BE][2/6] fix typos in test/ (test/test_*.py) (#157636) 2025-07-09 11:02:23 +00:00
test_tensor_creation_ops.py [BE][2/6] fix typos in test/ (test/test_*.py) (#157636) 2025-07-09 11:02:23 +00:00
test_tensorboard.py Fix test_tensorboard when started w/o tensorboard package (#154709) 2025-05-30 19:18:43 +00:00
test_tensorexpr_pybind.py
test_tensorexpr.py [BE][2/6] fix typos in test/ (test/test_*.py) (#157636) 2025-07-09 11:02:23 +00:00
test_testing.py [Torch] Fix crash when comparing fp8 tensors that have more than 1 dimension (#153508) 2025-05-15 08:41:46 +00:00
test_throughput_benchmark.py Fix Throughputbenchmark issue (#144669) 2025-01-26 03:37:20 +00:00
test_torch.py [BE][2/6] fix typos in test/ (test/test_*.py) (#157636) 2025-07-09 11:02:23 +00:00
test_transformers_privateuse1.py [OpenReg] Move SDPA to OpenReg from open_registration_extension.cpp (#153309) 2025-05-13 03:49:19 +00:00
test_transformers.py [BE][2/6] fix typos in test/ (test/test_*.py) (#157636) 2025-07-09 11:02:23 +00:00
test_type_hints.py
test_type_info.py
test_type_promotion.py [BE][2/6] fix typos in test/ (test/test_*.py) (#157636) 2025-07-09 11:02:23 +00:00
test_typing.py [BE][2/6] fix typos in test/ (test/test_*.py) (#157636) 2025-07-09 11:02:23 +00:00
test_unary_ufuncs.py [BE][2/6] fix typos in test/ (test/test_*.py) (#157636) 2025-07-09 11:02:23 +00:00
test_utils_config_module.py Add check that envvar configs are boolean (#145454) 2025-02-05 19:40:10 +00:00
test_utils_filelock.py
test_utils.py [docs] Decorator to create a deprecation warning (#155127) 2025-06-25 18:09:04 +00:00
test_view_ops.py [BE][2/6] fix typos in test/ (test/test_*.py) (#157636) 2025-07-09 11:02:23 +00:00
test_vulkan.py
test_weak.py [BE][2/6] fix typos in test/ (test/test_*.py) (#157636) 2025-07-09 11:02:23 +00:00
test_xnnpack_integration.py [BE][Ez]: ISC001 Auto concatenate implicit one line strings (#146408) 2025-02-04 19:07:04 +00:00
test_xpu.py Add device_id to XPU device properties (#156481) 2025-07-03 01:22:11 +00:00