Bug: no signature found for builtin type tensor convert2hydra
Can't automatically convert activation functions to a hydra structured module. When running
python convert2hydra.py "torch.nn.modules.activation" "activations.py"
The following error occurs
Traceback (most recent call last):
File "D:\PycharmProjects\mdml-tools\mdml_tools\scripts\convert2hydra.py", line 363, in <module>
main(args.import_str, args.no_original_docstring)
File "D:\PycharmProjects\mdml-tools\mdml_tools\scripts\convert2hydra.py", line 312, in main
output_py_file = write_dataclass_to_file(output_py_file, name, obj, sphinx_link_str, add_orig_docstring)
File "D:\PycharmProjects\mdml-tools\mdml_tools\scripts\convert2hydra.py", line 252, in write_dataclass_to_file
for key, value in inspect.signature(obj).parameters.items():
File "D:\Miniforge\envs\mdml\lib\inspect.py", line 3113, in signature
return Signature.from_callable(obj, follow_wrapped=follow_wrapped)
File "D:\Miniforge\envs\mdml\lib\inspect.py", line 2862, in from_callable
return _signature_from_callable(obj, sigcls=cls,
File "D:\Miniforge\envs\mdml\lib\inspect.py", line 2397, in _signature_from_callable
raise ValueError(
ValueError: no signature found for builtin type <class 'torch.Tensor'>