The captum.attr.visualization module is missing the link to its source code. I traced the issue with Sphinx's viewcode extension, and discovered that it gives the following warning.
No module named 'captum.attr.visualization'
In viewcode extension, the _get_full_modname function inside doctree_read returns None, and then skips generating the source docs. Inside the _get_full_modname function, a function called get_full_modname is run and it attempts to use importlib's import_module function to get the paths to the files
š Bug
The
captum.attr.visualization
module is missing the link to its source code. I traced the issue with Sphinx's viewcode extension, and discovered that it gives the following warning.In viewcode extension, the
_get_full_modname
function insidedoctree_read
returns None, and then skips generating the source docs. Inside the_get_full_modname
function, a function calledget_full_modname
is run and it attempts to useimportlib
'simport_module
function to get the paths to the fileshttps://github.com/sphinx-doc/sphinx/blob/master/sphinx/ext/viewcode.py#L116 https://github.com/sphinx-doc/sphinx/blob/master/sphinx/util/__init__.py#L242.
You can see that its missing it's link to the source code here: https://captum.ai/api/utilities.html#visualization
And the file being used is here: https://github.com/pytorch/captum/blob/master/captum/attr/_utils/visualization.py
I discovered this issue while trying to figure out why it's happening in the Optim module code.
Possible solutions for this issue are:
visualization.py
file's location matches the way it's called:captum/attr/visualization.py
visualization.py
directly, though this would remove thevisualization
part of the import path.