PyTorch convert function for op 'index_add_' not implemented.
- Dominant language
- Python
- Stars
- 22
- Forks
- 4
- PR merge metrics
- No merged PRs in 30d
Description
I tried using convert tools at branch manual-istft-plus-coremltools-7.0, but i got some errors:
Traceback (most recent call last):
File "/Users/x/Downloads/spleeter-pytorch-manual-istft-plus-coremltools-7.0/convert-to-coreml", line 59, in
main()
File "/Users/x/Downloads/spleeter-pytorch-manual-istft-plus-coremltools-7.0/convert-to-coreml", line 43, in main
mlmodel = ct.convert(
File "/Users/x/Library/Python/3.9/lib/python/site-packages/coremltools/converters/_converters_entry.py", line 551, in convert
mlmodel = mil_convert(
File "/Users/x/Library/Python/3.9/lib/python/site-packages/coremltools/converters/mil/converter.py", line 188, in mil_convert
return _mil_convert(model, convert_from, convert_to, ConverterRegistry, MLModel, compute_units, **kwargs)
File "/Users/x/Library/Python/3.9/lib/python/site-packages/coremltools/converters/mil/converter.py", line 212, in _mil_convert
proto, mil_program = mil_convert_to_proto(
File "/Users/x/Library/Python/3.9/lib/python/site-packages/coremltools/converters/mil/converter.py", line 286, in mil_convert_to_proto
prog = frontend_converter(model, **kwargs)
File "/Users/x/Library/Python/3.9/lib/python/site-packages/coremltools/converters/mil/converter.py", line 108, in __call__
return load(*args, **kwargs)
File "/Users/x/Library/Python/3.9/lib/python/site-packages/coremltools/converters/mil/frontend/torch/load.py", line 75, in load
return _perform_torch_convert(converter, debug)
File "/Users/x/Library/Python/3.9/lib/python/site-packages/coremltools/converters/mil/frontend/torch/load.py", line 122, in _perform_torch_convert
raise e
File "/Users/x/Library/Python/3.9/lib/python/site-packages/coremltools/converters/mil/frontend/torch/load.py", line 114, in _perform_torch_convert
prog = converter.convert()
File "/Users/x/Library/Python/3.9/lib/python/site-packages/coremltools/converters/mil/frontend/torch/converter.py", line 484, in convert
convert_nodes(self.context, self.graph)
File "/Users/x/Library/Python/3.9/lib/python/site-packages/coremltools/converters/mil/frontend/torch/ops.py", line 88, in convert_nodes
raise RuntimeError(
RuntimeError: PyTorch convert function for op 'index_add_' not implemented.
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the failure by running convert-to-coreml at line 43 on the manual-istft-plus-coremltools-7.0 branch. Then inspect coremltools/converters/mil/frontend/torch/ops.py around the reported conversion path for index_add_. Done means the conversion no longer raises the shown RuntimeError and produces the expected Core ML model.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, pytorch
- Domain
- machine-learning, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100