pytorch/torch
Aaron Gokaslan 4f4ecc583e [BE]: Enable RUFF TRY400 rule - log.exception (#153473)
Change logging.error to logging.exception to log additional information when relevant.  A few places have slipped in logging.errors in try except since I last did a clean up here and the rule is stabilized so I am enabling it codebase wide. I have NOQA'd much of our custom exception stack trace handling for RPC calls and distributed and tried to a fix a few errors based on whether we immediately reraised it or if we didn't print any exception handling where it could be useful.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/153473
Approved by: https://github.com/albanD, https://github.com/cyyever
2025-05-15 13:36:59 +00:00
..
_awaits
_C [BE] Update .pyi stub template to use Generic TypeAlias (PEP 585) and Union Type (PEP 604) (#150728) 2025-05-15 09:36:42 +00:00
_C_flatbuffer
_custom_op
_decomp Fix torch.isin decomposition for scalar inputs (#153216) 2025-05-09 20:26:25 +00:00
_dispatch
_dynamo [BE]: Enable RUFF TRY400 rule - log.exception (#153473) 2025-05-15 13:36:59 +00:00
_export [export] support functools.partial forward (non-strict) (#153408) 2025-05-13 23:30:13 +00:00
_functorch [compile-time traces] Profile large missing gaps in compile time (#151256) 2025-05-13 14:44:51 +00:00
_higher_order_ops Revert "[export][cond] support merging constant ints as unbacked symint (#152742)" 2025-05-12 23:06:33 +00:00
_inductor [BE]: Enable RUFF TRY400 rule - log.exception (#153473) 2025-05-15 13:36:59 +00:00
_lazy
_library Add torch._C.Tag.needs_contiguous_strides (#152859) 2025-05-08 04:49:59 +00:00
_logging fix set_logs for a single child log file (#153580) 2025-05-15 05:58:45 +00:00
_numpy Fix broken URLs (#152237) 2025-04-27 09:56:42 +00:00
_prims
_prims_common consolidate guard_or_x and definitely_x (#152463) 2025-05-02 18:08:11 +00:00
_refs [dynamic shapes] use try-catch instead of guard_or_true for reshape_view_helper (#152638) 2025-05-06 00:54:24 +00:00
_strobelight
_subclasses [torchgen] Refactor and simplify gen_pyi.py to use Generic TypeAlias (PEP 585) and Union Type (PEP 604) (#150727) 2025-05-15 09:36:42 +00:00
_vendor
accelerator Add torch.accelerator.device_index as accelerator's device switch context (#148864) 2025-04-25 09:45:25 +00:00
amp
ao Fix more URLs (#153277) 2025-05-14 16:23:50 +00:00
autograd [autograd][docs] Add more details on why save_for_backward is important in extending autograd note (#153005) 2025-05-09 16:36:57 +00:00
backends Revert "refine fp32 precision api (#125888)" 2025-05-11 00:35:46 +00:00
compiler [MegaCache] Return None on no compilation (#151921) 2025-04-23 04:32:06 +00:00
contrib
cpu [device_mesh] improve device selection logic (#150897) 2025-05-14 06:29:16 +00:00
csrc [Memento] On-demand mode using without torch api (#153171) 2025-05-15 06:07:04 +00:00
cuda make use_mem_pool threadlocal (#153356) 2025-05-13 00:16:07 +00:00
distributed [BE]: Enable RUFF TRY400 rule - log.exception (#153473) 2025-05-15 13:36:59 +00:00
distributions Fix support of MixtureSameFamily [bugfix]. (#151317) 2025-05-14 19:24:36 +00:00
export [BE]: Enable RUFF TRY400 rule - log.exception (#153473) 2025-05-15 13:36:59 +00:00
fft
func
futures
fx [BE]: Enable RUFF TRY400 rule - log.exception (#153473) 2025-05-15 13:36:59 +00:00
jit Fix broken URLs (#152237) 2025-04-27 09:56:42 +00:00
legacy
lib
linalg Fix broken URLs (#152237) 2025-04-27 09:56:42 +00:00
masked [BE]: Update ruff to 0.11.8 (#153249) 2025-05-12 18:30:52 +00:00
monitor
mps
mtia [Kineto] Enable OOM observer (#152160) 2025-04-27 15:56:44 +00:00
multiprocessing
nativert [nativert] Move Placement to pytorch core (#152953) 2025-05-14 15:26:54 +00:00
nested [Torch][NT] Fix NestedTensor contiguous check condition. (#153237) (#153529) 2025-05-14 17:15:48 +00:00
nn [BE] Update .pyi stub template to use Generic TypeAlias (PEP 585) and Union Type (PEP 604) (#150728) 2025-05-15 09:36:42 +00:00
onnx [BE]: Update ruff to 0.11.8 (#153249) 2025-05-12 18:30:52 +00:00
optim Add load_state_dict hint doc about invoke order work with lr_scheduler (#149942) 2025-05-15 01:07:36 +00:00
package [BE]: Enable ruff YTT linter for Python version checks (#153547) 2025-05-14 21:09:16 +00:00
profiler [profiler][retry] don't disable CUPTI_LAZY_REINIT for cuda >= 12.6 (#151124) 2025-04-15 16:11:49 +00:00
quantization
signal
sparse Revert "has_triton: Use the device interface for detecting Triton availability (#139171)" 2025-05-10 14:46:23 +00:00
special
testing [BE]: Enable RUFF TRY400 rule - log.exception (#153473) 2025-05-15 13:36:59 +00:00
utils [ca][dynamo] always run eager checkpoint region's recomputation in eager (#153300) 2025-05-15 08:10:35 +00:00
xpu Correct torch.xpu.is_bf16_supported return False if no XPU detected (#152317) 2025-05-06 10:03:17 +00:00
__config__.py
__future__.py
__init__.py [BE] Improve the typing related to model input argument of torch.compile() (#153559) 2025-05-15 04:49:26 +00:00
_appdirs.py Fix broken URLs (#152237) 2025-04-27 09:56:42 +00:00
_classes.py
_compile.py
_custom_ops.py
_deploy.py
_environment.py
_guards.py [BE]: Enable RUFF TRY400 rule - log.exception (#153473) 2025-05-15 13:36:59 +00:00
_jit_internal.py
_linalg_utils.py
_lobpcg.py Fixed rerr computation in lobpcg (#152789) 2025-05-08 12:22:31 +00:00
_lowrank.py
_meta_registrations.py API change for new enum in cusparseltsplitkmode-t for cusparseLT 0.7.0+ (#150536) 2025-05-14 23:36:53 +00:00
_namedtensor_internals.py
_ops.py Introduce unsafe way to mark functions as cacheable (#151603) 2025-04-21 17:37:38 +00:00
_python_dispatcher.py
_size_docs.py
_sources.py
_storage_docs.py
_streambase.py
_tensor_docs.py Fix broken URLs (#152237) 2025-04-27 09:56:42 +00:00
_tensor_str.py
_tensor.py Avoid triggering ignored requires_grad warning in our code (#152686) 2025-05-05 23:56:40 +00:00
_thread_safe_fork.py
_torch_docs.py Fix the basic description of torch.min(), torch.max(), torch.all(), torch.any() (#152658) 2025-05-08 22:59:14 +00:00
_utils_internal.py [reland] Add graph module runtime asserts to AOTI (#153182) 2025-05-09 22:56:19 +00:00
_utils.py
_VF.py
_vmap_internals.py Fix broken URLs (#152237) 2025-04-27 09:56:42 +00:00
_weights_only_unpickler.py
CMakeLists.txt
custom_class_detail.h
custom_class.h
extension.h
functional.py Optimize cdist param description (#151178) 2025-04-14 13:53:10 +00:00
hub.py
library.h Overload Library::def rather than templating it (#151626) 2025-04-18 22:51:16 +00:00
library.py fix spammy library deinit errors when user passes an invalid TORCH_LOGS argument (#151678) 2025-04-22 20:13:52 +00:00
overrides.py [CUDA][cuBLAS] Aten GEMM overload for FP32 output from FP16/BF16 inputs (#150812) 2025-04-18 01:53:26 +00:00
py.typed
quasirandom.py
random.py Update description for torch.random.fork_rng (#151881) 2025-04-23 16:59:29 +00:00
return_types.py
script.h
serialization.py
storage.py
torch_version.py
types.py
version.py.tpl