pytorch/test
Nikita Shulga 5837e95d30 [Reland] Update mypy to 1.4.1 (#105227)
This PR re-lands
- [Typing] Fix PEP 484 Violation (#105022)
- Update mypy to 1.4.1 (#91983)

That were reverted due to the conflict with internal source repo.

Mostly fixes for PEP-484 violation (i.e. when default arg is set to None, but type is not annotated as optional)
Plus few real fixes:
  - Add missing `_get_upgraders_entry_map` to `torch/_C/__init__.pyi`
  - Add missing return statement to `torch._export. deserialize_graph`
  - Fix error message in `torch.ao.ns.fx.weight_utils.get_lstm_mod_weights`
  - Add assert it `torch/optim/optimizer.py` that Optional list is not None
TODO (in followup PR):
  - Fix erroneous `isinstance` check in `torch/ao/quantization/_pt2e/qat_utils.py`

Unrelated, to bypass CI failures due to the gcc9 dependency update in Ubuntu-18.04:
- Add hack to squash older libstdc++ from conda environment in favor one from OS to `.ci/docker/install_conda.sh`
- Update bazel cuda builds to focal, as with libstdc++-6.0.32 bazel builds loose the ability to catch exceptions (probably because they link with cupti statically, but I could not found where it is done)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/105227
Approved by: https://github.com/atalman, https://github.com/albanD, https://github.com/Skylion007
2023-07-15 20:30:20 +00:00
..
_nvfuser
ao/sparsity [BE]: Apply ruff PERF fixes to torch (#104917) 2023-07-11 20:45:21 +00:00
autograd [reland] Deprecate registering autograd kernels at not an autograd key (#105078) 2023-07-14 15:03:07 +00:00
backends/xeon
benchmark_utils
bottleneck_test
cpp DDP + C10D sparse all_reduce changes (#103916) (#104256) 2023-06-28 00:37:52 +00:00
cpp_api_parity
cpp_extensions [functorch] disable C++ Function under functorch transforms (#103957) 2023-06-23 11:01:44 +00:00
custom_backend
custom_operator
distributed [FSDP] Refactor optimizer in backward (#104813) 2023-07-13 06:42:53 +00:00
distributions Fix Dirichlet.log_prob() when x=0 and alpha=1 (#103605) 2023-06-15 16:16:50 +00:00
dynamo SetVariable in dynamo (#103205) 2023-07-15 02:25:31 +00:00
edge [torchgen] Rename executorch's RuntimeContext to KernelRuntimeContext (#104892) 2023-07-14 21:15:50 +00:00
error_messages
expect Add empty/empty_like to core aten decomps (#105158) 2023-07-15 18:48:55 +00:00
export Preserve source_fn or nn_module_stack in the lifted params (#105017) 2023-07-13 06:03:28 +00:00
forward_backward_compatibility Remove unused private code from ATEN (#104751) 2023-07-12 16:09:42 +00:00
functorch New Mod class for SymPy expressions. (#104968) 2023-07-14 13:34:52 +00:00
fx [fx] Better replacements finder in subgraph rewriter (#100556) 2023-05-16 14:08:44 +00:00
inductor [quant][pt2e] Rename _pt2e to pt2e (#104668) 2023-07-15 06:34:17 +00:00
jit Remove set_default_dtype calls from jit and ops tests (#105072) 2023-07-15 03:18:33 +00:00
jit_hooks
lazy
mobile
nn [BE]: Apply ruff PERF fixes to torch (#104917) 2023-07-11 20:45:21 +00:00
onnx Transmute refined SymInt into int (#104828) 2023-07-15 18:46:10 +00:00
onnx_caffe2
optim [foreach][RMSprop] Minimize intermediates=2 to decrease peak memory (#105161) 2023-07-13 23:18:54 +00:00
package [fx] make fx.wrap idempotent (#104838) 2023-07-09 20:57:46 +00:00
profiler [optim] use lerp whenever possible (#104796) 2023-07-11 14:32:59 +00:00
quantization [quant][pt2e] Rename _pt2e to pt2e (#104668) 2023-07-15 06:34:17 +00:00
scripts
test_img
typing
_test_bazel.py [bazel] add build for functorch (#101475) 2023-05-18 20:29:08 +00:00
allowlist_for_publicAPI.json
conftest.py Do not collect and skip non-disabled tests when rerunning disabled tests (#102107) 2023-05-27 12:10:36 +00:00
create_dummy_torchscript_model.py
delete.py
HowToWriteTestsUsingFileCheck.md
linear.py
load_torchscript_model.py
mkl_verbose.py
mkldnn_verbose.py
run_doctests.sh
run_test.py Update run_test.py to use TEST_WITH_SLOW_GRADCHECK flag (#104819) 2023-07-11 21:58:46 +00:00
simulate_nccl_errors.py
test_ao_sparsity.py
test_autocast.py Add autocast support for IPU (#103890) 2023-06-22 15:38:45 +00:00
test_autograd.py [reland] Deprecate registering autograd kernels at not an autograd key (#105078) 2023-07-14 15:03:07 +00:00
test_binary_ufuncs.py Enable bitwise shift operations tests (#97150) 2023-07-06 15:32:57 +00:00
test_bundled_images.py
test_bundled_inputs.py
test_comparison_utils.py
test_compile_benchmark_util.py
test_complex.py
test_content_store.py
test_cpp_api_parity.py
test_cpp_extensions_aot.py Use random inputs for mps extension tests (#104597) 2023-07-06 07:14:56 +00:00
test_cpp_extensions_jit.py Use random inputs for mps extension tests (#104597) 2023-07-06 07:14:56 +00:00
test_cpp_extensions_open_device_registration.py add generic func to get function defined in custom device module (#99048) 2023-06-30 20:02:44 +00:00
test_cuda.py Refactor multigpu tests to test_cuda_multigpu (#104059) 2023-06-27 05:32:05 +00:00
test_cuda_expandable_segments.py
test_cuda_multigpu.py Refactor multigpu tests to test_cuda_multigpu (#104059) 2023-06-27 05:32:05 +00:00
test_cuda_nvml_based_avail.py
test_cuda_primary_ctx.py [BE] Use TEST_MULTIGPU from common_cuda.py (#103982) 2023-06-22 00:07:44 +00:00
test_cuda_sanitizer.py
test_cuda_trace.py
test_custom_op_testing.py [operator_compile_check] Add FakeTensor testing (#103595) 2023-06-16 16:55:51 +00:00
test_dataloader.py [DataLoader] Adding StackDataset (#101338) 2023-05-18 00:57:12 +00:00
test_datapipe.py [codemod][3.10][NamedTuple] Use typing_extensions to get NamedTuple Generics (#101830) 2023-05-19 22:50:18 +00:00
test_decomp.py [decomp] Add test tracking core ATen operators (#104262) 2023-07-04 16:41:44 +00:00
test_deploy.py
test_determination.py
test_dispatch.py [reland] Deprecate registering autograd kernels at not an autograd key (#105078) 2023-07-14 15:03:07 +00:00
test_dlpack.py add additional stream priority for cuda streams (#101956) 2023-05-27 02:36:16 +00:00
test_dynamic_shapes.py Transmute refined SymInt into int (#104828) 2023-07-15 18:46:10 +00:00
test_expanded_weights.py tf32 context fixes for various tests (#103137) 2023-06-15 02:33:12 +00:00
test_fake_tensor.py Fix broken meta registration for torch.full (#104451) 2023-06-30 05:14:52 +00:00
test_flop_counter.py De-register forward hooks upon exiting flop counter context (#103744) 2023-06-20 19:34:02 +00:00
test_foreach.py Revert "Add forward mode AD to out-place foreach functions (#102409)" 2023-06-30 22:46:57 +00:00
test_function_schema.py
test_functional_autograd_benchmark.py
test_functional_optim.py
test_functionalization.py Upgrade LoggingTensor mode and add traceback collection (#103734) 2023-06-21 22:04:30 +00:00
test_functionalization_of_rng_ops.py
test_futures.py [Reland] Update mypy to 1.4.1 (#105227) 2023-07-15 20:30:20 +00:00
test_fx.py Preserve original co_filename when FX symbolic_trace (#103885) 2023-07-05 22:00:05 +00:00
test_fx_experimental.py
test_fx_passes.py
test_fx_reinplace_pass.py
test_hub.py [BE]: Apply ruff PERF fixes to torch (#104917) 2023-07-11 20:45:21 +00:00
test_import_stats.py
test_indexing.py [Dynamo] Fix lineinfo generation on PY3.11+ (#103525) 2023-06-14 05:41:43 +00:00
test_itt.py
test_jit.py Remove set_default_dtype calls from jit and ops tests (#105072) 2023-07-15 03:18:33 +00:00
test_jit_autocast.py
test_jit_cuda_fuser.py Remove set_default_dtype calls from jit and ops tests (#105072) 2023-07-15 03:18:33 +00:00
test_jit_disabled.py
test_jit_fuser.py
test_jit_fuser_legacy.py
test_jit_fuser_te.py
test_jit_legacy.py
test_jit_llga_fuser.py [BE] Deprecate has_XYZ attributes (#103279) 2023-06-10 05:17:17 +00:00
test_jit_profiling.py
test_jit_simple.py
test_jit_string.py
test_jiterator.py
test_kernel_launch_checks.py
test_legacy_vmap.py [BE]: Apply ruff PERF fixes to torch (#104917) 2023-07-11 20:45:21 +00:00
test_license.py
test_linalg.py Revert "[ROCm] reduce tolerance for triangular solve with well_conditioned set to True (#104425)" 2023-07-03 04:18:04 +00:00
test_logging.py
test_masked.py
test_maskedtensor.py Tighten FakeTensor reentrancy asserts, add debugging (#102091) 2023-05-24 05:37:51 +00:00
test_matmul_cuda.py
test_meta.py [pt2] add metas for multilabel_margin_loss ops (#104388) 2023-07-05 13:42:22 +00:00
test_metal.py
test_mkl_verbose.py
test_mkldnn.py [BE]: Apply ruff PERF fixes to torch (#104917) 2023-07-11 20:45:21 +00:00
test_mkldnn_fusion.py inductor: reduce compile time for cpu backend by reducing weight conversion (#104402) 2023-07-06 13:44:50 +00:00
test_mkldnn_verbose.py
test_mobile_optimizer.py
test_model_dump.py
test_module_init.py
test_modules.py Add partial derivative unit tests (#103809) 2023-06-25 00:36:10 +00:00
test_monitor.py
test_mps.py correct empty tensor mps all operation (#105218) 2023-07-14 17:42:54 +00:00
test_multiprocessing.py
test_multiprocessing_spawn.py
test_namedtensor.py
test_namedtuple_return_api.py Upstream xformers code (#100583) 2023-05-18 16:15:34 +00:00
test_native_functions.py
test_native_mha.py
test_nestedtensor.py
test_nn.py [OpInfo] add reference and error inputs for multi_margin_loss (#104850) 2023-07-14 21:16:09 +00:00
test_nnapi.py
test_numba_integration.py
test_numpy_interop.py
test_nvfuser_dynamo.py
test_nvfuser_frontend.py
test_openmp.py
test_ops.py Remove set_default_dtype calls from jit and ops tests (#105072) 2023-07-15 03:18:33 +00:00
test_ops_fwd_gradients.py
test_ops_gradients.py [custom_op] explicit autograd API (#101824) 2023-05-23 18:31:29 +00:00
test_ops_jit.py
test_optim.py [optim][BE] split test file into logical parts: SWA, LR, optim (#101100) 2023-05-12 16:41:44 +00:00
test_overrides.py
test_package.py
test_per_overload_api.py
test_prims.py Upgrade LoggingTensor mode and add traceback collection (#103734) 2023-06-21 22:04:30 +00:00
test_proxy_tensor.py Transmute refined SymInt into int (#104828) 2023-07-15 18:46:10 +00:00
test_pruning_op.py
test_public_bindings.py [BE]: Apply ruff PERF fixes to torch (#104917) 2023-07-11 20:45:21 +00:00
test_python_dispatch.py Upgrade LoggingTensor mode and add traceback collection (#103734) 2023-06-21 22:04:30 +00:00
test_pytree.py Serialize empty pytree cases (#105159) 2023-07-13 23:02:59 +00:00
test_quantization.py [Quant][PT2E]Enable x86 inductor quantizer (#98730) 2023-06-17 06:10:23 +00:00
test_reductions.py
test_scatter_gather_ops.py Optimize scatter_add/scatter_reduce in BFloat16/Half data type in CPU backend (#103427) 2023-07-13 09:34:29 +00:00
test_schema_check.py
test_segment_reductions.py Enable more tests (#104437) 2023-06-30 16:26:11 +00:00
test_serialization.py Add functions to get and set default endianness in load() functions (#101973) 2023-07-06 20:12:56 +00:00
test_set_default_mobile_cpu_allocator.py
test_shape_ops.py
test_show_pickle.py
test_sort_and_select.py Make 1D integer sorting work in parallel (#100081) 2023-06-02 07:41:28 +00:00
test_sparse.py Add semi-structured sparse conversions (#103830) 2023-07-13 21:09:09 +00:00
test_sparse_csr.py SDPA: frontend for BSR masks (#104042) 2023-07-13 18:01:21 +00:00
test_sparse_semi_structured.py Update sparse semi-structured linear operator (#104608) 2023-07-13 23:52:39 +00:00
test_spectral_ops.py
test_stateless.py
test_static_runtime.py
test_subclass.py [BE]: Apply ruff PERF fixes to torch (#104917) 2023-07-11 20:45:21 +00:00
test_sympy_utils.py Perform value range analysis with rationals when possible (#105137) 2023-07-13 16:45:47 +00:00
test_tensor_creation_ops.py Revert "[dynamo 3.11] enable other torch 3.11 dynamo-related tests (#99180)" 2023-05-12 16:18:22 +00:00
test_tensorboard.py [PyTorch-TB] Write full tensor as tensor proto (#105186) 2023-07-14 18:04:09 +00:00
test_tensorexpr.py Generate nearbyint for Round in tensorexpr llvm codegen, match torch.round result (#104430) 2023-07-07 01:47:46 +00:00
test_tensorexpr_pybind.py
test_testing.py Make torch._dynamo lazy-importable (#104368) 2023-06-29 00:51:59 +00:00
test_throughput_benchmark.py
test_torch.py [Reland] Update mypy to 1.4.1 (#105227) 2023-07-15 20:30:20 +00:00
test_transformers.py REDO of dropout support for mem eff #102038 (#103704) 2023-06-26 23:05:03 +00:00
test_type_hints.py
test_type_info.py
test_type_promotion.py
test_typing.py
test_unary_ufuncs.py enable ASAN on some tests (#103647) 2023-06-28 02:17:14 +00:00
test_utils.py Add torch._utils.render_call, improve printoptions (#102623) 2023-05-31 22:08:04 +00:00
test_view_ops.py
test_vulkan.py
test_weak.py
test_xnnpack_integration.py