I am trying to run the Google Colab found here, which is a tutorial for tensorflow-federated
. First of all, there is an error in the Colab section Displaying model metrics on Tensorboard, in the cell:
#@test {"skip": true}
with summary_writer.as_default():
for round_num in range(1, NUM_ROUNDS):
state, metrics = iterative_process.next(state, federated_train_data)
for name, value in metrics.train._asdict().items():
tf.summary.scalar(name, value, step=round_num)
which gets solved in the following way:
#@test {"skip": true}
with summary_writer.as_default():
for round_num in range(1, NUM_ROUNDS):
state, metrics = iterative_process.next(state, federated_train_data)
for name, value in metrics['train'].items():
tf.summary.scalar(name, value, step=round_num)
However I am stuck in the same section because, when trying to run tensorboard I get the error:
ERROR: Failed to launch TensorBoard (exited with 1).
Contents of stderr:
2020-10-15 07:50:26.425571: W tensorflow/stream_executor/platform/default/dso_loader.cc:60] Could not load dynamic library 'libcudart.so.11.0'; dlerror: libcudart.so.11.0: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /usr/lib64-nvidia
2020-10-15 07:50:26.425634: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.
Traceback (most recent call last):
File "/usr/local/bin/tensorboard", line 8, in <module>
sys.exit(run_main())
File "/usr/local/lib/python3.6/dist-packages/tensorboard/main.py", line 75, in run_main
app.run(tensorboard.main, flags_parser=tensorboard.configure)
File "/usr/local/lib/python3.6/dist-packages/absl/app.py", line 299, in run
_run_main(main, args)
File "/usr/local/lib/python3.6/dist-packages/absl/app.py", line 250, in _run_main
sys.exit(main(argv))
File "/usr/local/lib/python3.6/dist-packages/tensorboard/program.py", line 289, in main
return runner(self.flags) or 0
File "/usr/local/lib/python3.6/dist-packages/tensorboard/program.py", line 305, in _run_serve_subcommand
server = self._make_server()
File "/usr/local/lib/python3.6/dist-packages/tensorboard/program.py", line 419, in _make_server
ingester.deprecated_multiplexer,
File "/usr/local/lib/python3.6/dist-packages/tensorboard/backend/application.py", line 149, in TensorBoardWSGIApp
experimental_middlewares,
File "/usr/local/lib/python3.6/dist-packages/tensorboard/backend/application.py", line 257, in __init__
"Duplicate plugins for name %s" % plugin.plugin_name
ValueError: Duplicate plugins for name projector
Searching for the error, as other posts suggested, I tried to uninstall/reinstall the packages tf-nightly
and tensorflow
, but it did not solve. Assuming the problem is generated by package conflicts, the versions of the most relevant Colab packages are the following:
tb-nightly 2.4.0a20201014
tblib 1.7.0
tensorboard-plugin-wit 1.7.0
tensorboardcolab 0.0.22
tensorflow 2.3.0
tensorflow-addons 0.8.3
tensorflow-datasets 2.1.0
tensorflow-estimator 2.3.0
tensorflow-federated-nightly 0.16.1.dev20201014
tensorflow-gcs-config 2.3.0
tensorflow-hub 0.9.0
tensorflow-metadata 0.24.0
tensorflow-model-optimization 0.4.1
tensorflow-privacy 0.5.1
tensorflow-probability 0.11.0
termcolor 1.1.0
terminado 0.9.1
testpath 0.4.4
text-unidecode 1.3
textblob 0.15.3
textgenrnn 1.4.1
tf-estimator-nightly 2.4.0.dev2020101401
tf-nightly 2.4.0.dev20201014
tfa-nightly 0.12.0.dev20201012231340
Does anyone know how to solve this?
This looks like https://github.com/tensorflow/federated/issues/914 and was likely fixed in https://github.com/tensorflow/federated/commit/2add5c8d9dbb5945f6f8240b13965292625a8f65.
This should be in TFF
0.17.0
and later.