【问题标题】:Google-Colab tutorial on Tensorflow-federated failing when launching Tensorboard启动 Tensorboard 时,Tensorflow 联合失败的 Google-Colab 教程
【发布时间】:2021-01-29 16:37:15
【问题描述】:

我正在尝试运行 Google Colab found here,这是 tensorflow-federated 的教程。首先,Colab部分Displaying model metrics on Tensorboard有错误,在单元格中:

#@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)

通过以下方式解决:

#@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)

但是我被困在同一部分,因为在尝试运行 tensorboard 时出现错误:

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

搜索错误,正如其他帖子所建议的那样,我尝试卸载/重新安装包tf-nightly 和tensorflow,但没有解决。假设问题是由包冲突产生的,最相关的 Colab 包的版本如下:

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

有人知道怎么解决吗?

【问题讨论】:

    标签: python tensorflow google-colaboratory tensorboard tensorflow-federated


    【解决方案1】:

    这看起来像 https://github.com/tensorflow/federated/issues/914 并且可能已在 https://github.com/tensorflow/federated/commit/2add5c8d9dbb5945f6f8240b13965292625a8f65 中修复。

    这应该在 TFF 0.17.0 和更高版本中。

    【讨论】:

      猜你喜欢
      • 2020-05-08
      • 2020-06-12
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-04-01
      • 1970-01-01
      • 2016-03-04
      • 2018-03-26
      相关资源
      最近更新 更多