pytorch/torch/utils
Kasperi Apell a7915c56f6 Propagate callable parameter types using ParamSpec (#142306) (#143797)
The codebase has a few locations where callable parameter type information is lost when the unpackings *args and **kwargs are typed as Any. Refactor these instances to retain type information using typing_extensions.ParamSpec.

Also, in these functions, enforce return type with TypeVar.

Addresses #142306

Pull Request resolved: https://github.com/pytorch/pytorch/pull/143797
Approved by: https://github.com/Skylion007

Co-authored-by: Aaron Gokaslan <aaronGokaslan@gmail.com>
Co-authored-by: Xuehai Pan <XuehaiPan@outlook.com>
2024-12-29 23:03:14 +00:00
..
_strobelight Propagate callable parameter types using ParamSpec (#142306) (#143797) 2024-12-29 23:03:14 +00:00
_sympy Propagate callable parameter types using ParamSpec (#142306) (#143797) 2024-12-29 23:03:14 +00:00
backcompat
benchmark remove allow-untyped-defs for torch/utils/benchmark/examples/simple_timeit.py (#143368) 2024-12-17 17:19:11 +00:00
bottleneck
data Revert "Use absolute path path.resolve() -> path.absolute() (#129409)" 2024-12-26 17:26:06 +00:00
hipify Revert "[reland][AMD] Turn on TF32 for aten::mm (#143549)" 2024-12-23 06:47:36 +00:00
jit
model_dump
serialization Add config.save.use_pinned_memory_for_d2h to serialization config (#143342) 2024-12-20 21:01:18 +00:00
tensorboard remove allow-untyped-defs from utils/tensorboard/_convert_np.py (#143918) 2024-12-27 22:19:33 +00:00
viz
__init__.py
_backport_slots.py
_config_module.py Add config alias (#142088) 2024-12-16 18:51:17 +00:00
_config_typing.pyi
_content_store.py
_contextlib.py
_cpp_extension_versioner.py
_cxx_pytree.py [BE][CI] bump ruff to 0.8.4 (#143753) 2024-12-24 12:24:10 +00:00
_device.py
_exposed_in.py Type exposed_in decorator (#141894) 2024-12-03 16:28:17 +00:00
_filelock.py filelock: Make waitcounter variant to use (#139816) 2024-12-12 01:18:34 +00:00
_foreach_utils.py
_freeze.py [BE][CI] bump ruff to 0.8.4 (#143753) 2024-12-24 12:24:10 +00:00
_functools.py dynamo tracing perf: cache on import_source: 52.9 -> 52.58 (#143058) 2024-12-13 18:20:48 +00:00
_get_clean_triton.py
_import_utils.py
_mode_utils.py
_ordered_set.py
_python_dispatch.py
_pytree.py [BE][CI] bump ruff to 0.8.4 (#143753) 2024-12-24 12:24:10 +00:00
_stats.py Propagate callable parameter types using ParamSpec (#142306) (#143797) 2024-12-29 23:03:14 +00:00
_thunk.py
_traceback.py
_triton.py Adding lowering to persistent-tma device kernel for _scaled_mm (#142045) 2024-12-09 01:48:40 +00:00
_typing_utils.py
_zip.py
backend_registration.py
bundled_inputs.py
checkpoint.py
collect_env.py Disable PIP version check in collect_env (#142308) 2024-12-10 19:16:36 +00:00
cpp_backtrace.py
cpp_extension.py Revert "Use absolute path path.resolve() -> path.absolute() (#129409)" 2024-12-26 17:26:06 +00:00
deterministic.py
dlpack.py
file_baton.py
flop_counter.py
hooks.py
mkldnn.py
mobile_optimizer.py
model_zoo.py
module_tracker.py Fix memory leak in ModuleTracker (#141960) 2024-12-03 18:36:15 +00:00
show_pickle.py
throughput_benchmark.py
weak.py