When trying to launch Tensorboard, the following error appears (docker image Tensorflow:2.9.1).
2024-04-09 12:10:53.425 1 ERROR asyncio [-] Task exception was never retrieved
future: <Task finished name='Task-19' coro=<CancellablePool.apply() done, defined at /usr/local/lib/python3.8/dist-packages/deepaas/model/v2/wrapper.py:380> exception=FileNotFoundError(2, 'No such file or directory')>: FileNotFoundError: [Errno 2] No such file or directory: 'fuser'
2024-04-09 12:10:53.425 1 ERROR asyncio multiprocessing.pool.RemoteTraceback:
2024-04-09 12:10:53.425 1 ERROR asyncio """
2024-04-09 12:10:53.425 1 ERROR asyncio Traceback (most recent call last):
2024-04-09 12:10:53.425 1 ERROR asyncio File "/usr/lib/python3.8/multiprocessing/pool.py", line 125, in worker
2024-04-09 12:10:53.425 1 ERROR asyncio result = (True, func(*args, **kwds))
2024-04-09 12:10:53.425 1 ERROR asyncio File "/srv/demo_app/demo_app/api.py", line 88, in train
2024-04-09 12:10:53.425 1 ERROR asyncio launch_tensorboard(logdir=logdir)
2024-04-09 12:10:53.425 1 ERROR asyncio File "/srv/demo_app/demo_app/misc.py", line 92, in launch_tensorboard
2024-04-09 12:10:53.425 1 ERROR asyncio subprocess.run(
2024-04-09 12:10:53.425 1 ERROR asyncio File "/usr/lib/python3.8/subprocess.py", line 493, in run
2024-04-09 12:10:53.425 1 ERROR asyncio with Popen(*popenargs, **kwargs) as process:
2024-04-09 12:10:53.425 1 ERROR asyncio File "/usr/lib/python3.8/subprocess.py", line 858, in __init__
2024-04-09 12:10:53.425 1 ERROR asyncio self._execute_child(args, executable, preexec_fn, close_fds,
2024-04-09 12:10:53.425 1 ERROR asyncio File "/usr/lib/python3.8/subprocess.py", line 1704, in _execute_child
2024-04-09 12:10:53.425 1 ERROR asyncio raise child_exception_type(errno_num, err_msg, err_filename)
2024-04-09 12:10:53.425 1 ERROR asyncio FileNotFoundError: [Errno 2] No such file or directory: 'fuser'
2024-04-09 12:10:53.425 1 ERROR asyncio """
Fixes
Staying with Tensorflow 2.9.1
fuser can be installed by installing psmisc.
apt-get install psmisc
This then raises the following error:
Traceback (most recent call last):
File "/usr/local/bin/tensorboard", line 5, in <module>
from tensorboard.main import run_main
File "/usr/local/lib/python3.8/dist-packages/tensorboard/main.py", line 27, in <module>
from tensorboard import default
File "/usr/local/lib/python3.8/dist-packages/tensorboard/default.py", line 33, in <module>
from tensorboard.plugins.audio import audio_plugin
File "/usr/local/lib/python3.8/dist-packages/tensorboard/plugins/audio/audio_plugin.py", line 25, in <module>
from tensorboard.data import provider
File "/usr/local/lib/python3.8/dist-packages/tensorboard/data/__init__.py", line 17, in <module>
from tensorboard.data import experimental # noqa: F401
File "/usr/local/lib/python3.8/dist-packages/tensorboard/data/experimental/__init__.py", line 17, in <module>
from tensorboard.data.experimental.experiment_from_dev import ( # noqa: F401
File "/usr/local/lib/python3.8/dist-packages/tensorboard/data/experimental/experiment_from_dev.py", line 27, in <module>
from tensorboard.uploader import server_info as server_info_lib
File "/usr/local/lib/python3.8/dist-packages/tensorboard/uploader/server_info.py", line 23, in <module>
from tensorboard.plugins.scalar import metadata as scalars_metadata
File "/usr/local/lib/python3.8/dist-packages/tensorboard/plugins/scalar/metadata.py", line 18, in <module>
from tensorboard.compat.proto import summary_pb2
File "/usr/local/lib/python3.8/dist-packages/tensorboard/compat/proto/summary_pb2.py", line 17, in <module>
from tensorboard.compat.proto import tensor_pb2 as tensorboard_dot_compat_dot_proto_dot_tensor__pb2
File "/usr/local/lib/python3.8/dist-packages/tensorboard/compat/proto/tensor_pb2.py", line 16, in <module>
from tensorboard.compat.proto import resource_handle_pb2 as tensorboard_dot_compat_dot_proto_dot_resource__handle__pb2
File "/usr/local/lib/python3.8/dist-packages/tensorboard/compat/proto/resource_handle_pb2.py", line 16, in <module>
from tensorboard.compat.proto import tensor_shape_pb2 as tensorboard_dot_compat_dot_proto_dot_tensor__shape__pb2
File "/usr/local/lib/python3.8/dist-packages/tensorboard/compat/proto/tensor_shape_pb2.py", line 36, in <module>
_descriptor.FieldDescriptor(
File "/usr/local/lib/python3.8/dist-packages/google/protobuf/descriptor.py", line 621, in __new__
_message.Message._CheckCalledFromGeneratedFile()
TypeError: Descriptors cannot be created directly.
If this call came from a _pb2.py file, your generated code is out of date and must be regenerated with protoc >= 3.19.0.
If you cannot immediately regenerate your protos, some other possible workarounds are:
1. Downgrade the protobuf package to 3.20.x or lower.
2. Set PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python (but this will use pure-Python parsing and will be much slower).
When trying to launch Tensorboard, the following error appears (docker image Tensorflow:2.9.1).
Fixes
Staying with Tensorflow 2.9.1
fuser
can be installed by installingpsmisc
.This then raises the following error:
which is in turn fixed by:
Upgrading to Tensorflow 2.16.1
Simply install
psmisc
.