Summary
The latest version of tensorboard-plugin-profile (v2.22+) has changed its module structure. The convert module is now imported from xprof instead of tensorboard_plugin_profile.convert, causing ModuleNotFoundError when loading .pb files.
Error
File "TraceLens/util.py", line 34, in load_data from tensorboard_plugin_profile.convert import raw_to_tool_data as convert ModuleNotFoundError: No module named 'tensorboard_plugin_profile.convert'
Root Cause
In tensorboard-plugin-profile v2.22+, the package is a passthrough to xprof:
# tensorboard_plugin_profile/__init__.py
from xprof import convert
...
The correct import is now from xprof.convert import raw_to_tool_data.
Proposed Fix
Update TraceLens/util.py line 34:
# Before:
from tensorboard_plugin_profile.convert import raw_to_tool_data as convert
# After:
try:
from tensorboard_plugin_profile.convert import raw_to_tool_data as convert
except (ImportError, ModuleNotFoundError):
from xprof.convert import raw_to_tool_data as convert
Environment
tensorboard-plugin-profile==2.22.1
xprof==2.22.1
Python 3.10
Summary
The latest version of
tensorboard-plugin-profile(v2.22+) has changed its module structure. Theconvertmodule is now imported fromxprofinstead oftensorboard_plugin_profile.convert, causingModuleNotFoundErrorwhen loading.pbfiles.Error
File "TraceLens/util.py", line 34, in load_data from tensorboard_plugin_profile.convert import raw_to_tool_data as convert ModuleNotFoundError: No module named 'tensorboard_plugin_profile.convert'
Root Cause
In
tensorboard-plugin-profilev2.22+, the package is a passthrough toxprof: