pytorch/torch/utils
Kevin Tse 27e5299ee3 [DataPipe] Fix mishandling of exception message when error is not iterable (#84676)
We sometimes get an exception message like this:
```
This exception is thrown by __iter__ of TarArchiveLoaderIterDataPipe(datapipe=FileOpenerIterDataPipe, length=-1, mode='r:')    elif msg not in e.args[0] and single_iterator_msg not in e.args[0]:

TypeError: argument of type 'int' is not iterable
```

The `TypeError` raised by the mishandling of the error message obfuscates the true exception, which now will be show as:
```
FileNotFoundError: [Errno 2] No such file or directory:
```
Pull Request resolved: https://github.com/pytorch/pytorch/pull/84676
Approved by: https://github.com/ejguan
2022-09-09 14:34:13 +00:00
..
backcompat
benchmark
bottleneck
data [DataPipe] Fix mishandling of exception message when error is not iterable (#84676) 2022-09-09 14:34:13 +00:00
hipify
jit
model_dump
tensorboard
__init__.py
_cpp_extension_versioner.py
_crash_handler.py
_cuda_trace.py Add synchronize hooks (#84427) 2022-09-09 13:56:59 +00:00
_freeze.py
_mode_utils.py
_python_dispatch.py
_pytree.py Add SymFloat, support SymInt to SymFloat conversion (#84284) 2022-09-03 01:30:32 +00:00
_zip.py
bundled_inputs.py
checkpoint.py
collect_env.py
cpp_extension.py
dlpack.py
file_baton.py
hooks.py
mkldnn.py
mobile_optimizer.py
model_zoo.py
show_pickle.py
throughput_benchmark.py