pytorch
a0ca9dc8 - [torchgen] Small fix for empty yaml file edge case (#92938)

Commit
1 year ago
[torchgen] Small fix for empty yaml file edge case (#92938) Rely on CI. Avoid issues such as: ``` Traceback (most recent call last): File "<string>", line 38, in <module> File "<string>", line 36, in __run File "/usr/local/fbcode/platform010/lib/python3.8/runpy.py", line 194, in _run_module_as_main return _run_code(code, main_globals, None, File "/usr/local/fbcode/platform010/lib/python3.8/runpy.py", line 87, in _run_code exec(code, run_globals) File "/re_cwd/buck-out/v2/gen/fbcode/2841b324ed9b88dd/caffe2/torchgen/__gen_executorch__/gen_executorch#link-tree/torchgen/gen_executorch.py", line 690, in <module> main() File "/re_cwd/buck-out/v2/gen/fbcode/2841b324ed9b88dd/caffe2/torchgen/__gen_executorch__/gen_executorch#link-tree/torchgen/gen_executorch.py", line 626, in main parsed_yaml, custom_ops_parsed_yaml = parse_yaml_files( File "/re_cwd/buck-out/v2/gen/fbcode/2841b324ed9b88dd/caffe2/torchgen/__gen_executorch__/gen_executorch#link-tree/torchgen/gen_executorch.py", line 505, in parse_yaml_files translate_native_yaml( File "/re_cwd/buck-out/v2/gen/fbcode/2841b324ed9b88dd/caffe2/torchgen/__gen_executorch__/gen_executorch#link-tree/torchgen/gen_executorch.py", line 448, in translate_native_yaml for e in native_es: TypeError: 'NoneType' object is not iterable ``` Differential Revision: [D42729435](https://our.internmc.facebook.com/intern/diff/D42729435) Pull Request resolved: https://github.com/pytorch/pytorch/pull/92938 Approved by: https://github.com/JacobSzwejbka
Author
Committer
Parents
Loading