gpt4 book ai didi

logging - 如何更改张量板的日志记录级别?

转载 作者:行者123 更新时间:2023-12-04 15:43:37 25 4
gpt4 key购买 nike

我在 tensorboard 的启动参数中找不到这样的选项。当我列出所有标志时,我发现的是这样的:

logdir      --> .tensorboard/log_2019-06-30_18-33-18_952122
host -->
port --> None
purge_orphaned_data --> True
reload_interval --> 5.0
db -->
db_import --> False
db_import_use_op --> False
inspect --> False
version_tb --> False
tag -->
event_file -->
path_prefix -->
window_title -->
max_reload_threads --> 1
reload_task --> auto
samples_per_plugin -->
debugger_data_server_grpc_port --> -1
debugger_port --> -1
master_tpu_unsecure_channel -->

在操作中,它的日志记录级别设置为“警告”&日志消息直接打印在标准输出上,结果我在编写复杂模型时看到了很多不必要的消息,像这样:

I0630 18:33:19.152284 140581946894080 _internal.py:122] ::ffff:127.0.0.1 - - [30/Jun/2019 18:33:19] "GET / HTTP/1.1" 200 -
I0630 18:33:19.335198 140581946894080 _internal.py:122] ::ffff:127.0.0.1 - - [30/Jun/2019 18:33:19] "GET /font-roboto/oMMgfZMQthOryQo9n22dcuvvDin1pK8aKteLpeZ5c0A.woff2 HTTP/1.1" 200 -
I0630 18:33:20.419392 140581806262016 _internal.py:122] ::ffff:127.0.0.1 - - [30/Jun/2019 18:33:20] "GET /data/plugins_listing HTTP/1.1" 200 -
I0630 18:33:20.422904 140581212772096 _internal.py:122] ::ffff:127.0.0.1 - - [30/Jun/2019 18:33:20] "GET /data/environment HTTP/1.1" 200 -
I0630 18:33:20.424074 140581221164800 _internal.py:122] ::ffff:127.0.0.1 - - [30/Jun/2019 18:33:20] "GET /data/runs HTTP/1.1" 200 -
I0630 18:33:20.428111 140581204379392 _internal.py:122] ::ffff:127.0.0.1 - - [30/Jun/2019 18:33:20] "GET /data/experiments HTTP/1.1" 200 -
I0630 18:33:20.490971 140581204379392 _internal.py:122] ::ffff:127.0.0.1 - - [30/Jun/2019 18:33:20] "GET /font-roboto/RxZJdnzeo3R5zSexge8UUZBw1xU1rKptJj_0jans920.woff2 HTTP/1.1" 200 -
I0630 18:33:20.519970 140581204379392 _internal.py:122] ::ffff:127.0.0.1 - - [30/Jun/2019 18:33:20] "GET /data/plugins_listing HTTP/1.1" 200 -
I0630 18:33:20.522117 140581221164800 _internal.py:122] ::ffff:127.0.0.1 - - [30/Jun/2019 18:33:20] "GET /data/environment HTTP/1.1" 200 -
I0630 18:33:20.531321 140581212772096 _internal.py:122] ::ffff:127.0.0.1 - - [30/Jun/2019 18:33:20] "GET /data/runs HTTP/1.1" 200 -
I0630 18:33:20.533931 140581221164800 _internal.py:122] ::ffff:127.0.0.1 - - [30/Jun/2019 18:33:20] "GET /data/experiments HTTP/1.1" 200 -
I0630 18:33:20.709606 140581221164800 _internal.py:122] ::ffff:127.0.0.1 - - [30/Jun/2019 18:33:20] "GET /font-roboto/d-6IYplOFocCacKzxwXSOJBw1xU1rKptJj_0jans920.woff2 HTTP/1.1" 200 -

我如何摆脱它们?

最佳答案

我要做的唯一一件事就是关闭整个程序的日志记录。我希望有一个更优雅的解决方案,但现在它可以避免那些烦人的刷新通知:

logging.disable(logging.ERROR)

希望这对您有所帮助!

(Tensorboard 团队,请添加冗长标志或类似内容)

关于logging - 如何更改张量板的日志记录级别?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56829286/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com