summary_test.py 文件源码

python
阅读 20 收藏 0 点赞 0 评论 0

项目:tensorboard 作者: tensorflow 项目源码 文件源码
def test_all_exports_correspond_to_plugins(self):
    exports = [name for name in dir(tb.summary) if not name.startswith('_')]
    futures = frozenset(('absolute_import', 'division', 'print_function'))
    bad_exports = [
        name for name in exports
        if name not in futures and not any(
            name == plugin or name.startswith('%s_' % plugin)
            for plugin in STANDARD_PLUGINS)
    ]
    if bad_exports:
      self.fail(
          'The following exports do not correspond to known standard '
          'plugins: %r. Please mark these as private by prepending an '
          'underscore to their names, or, if they correspond to a new '
          'plugin that you are certain should be part of the public API '
          'forever, add that plugin to the STANDARD_PLUGINS set in this '
          'module.' % bad_exports)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号