当前位置: 首页>>代码示例>>Python>>正文


Python logger.config_benchmark_logger方法代码示例

本文整理汇总了Python中official.utils.logs.logger.config_benchmark_logger方法的典型用法代码示例。如果您正苦于以下问题:Python logger.config_benchmark_logger方法的具体用法?Python logger.config_benchmark_logger怎么用?Python logger.config_benchmark_logger使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在official.utils.logs.logger的用法示例。


在下文中一共展示了logger.config_benchmark_logger方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: test_config_base_benchmark_logger

# 需要导入模块: from official.utils.logs import logger [as 别名]
# 或者: from official.utils.logs.logger import config_benchmark_logger [as 别名]
def test_config_base_benchmark_logger(self):
    with flagsaver.flagsaver(benchmark_logger_type="BaseBenchmarkLogger"):
      logger.config_benchmark_logger()
      self.assertIsInstance(logger.get_benchmark_logger(),
                            logger.BaseBenchmarkLogger) 
开发者ID:IntelAI,项目名称:models,代码行数:7,代码来源:logger_test.py

示例2: test_config_benchmark_file_logger

# 需要导入模块: from official.utils.logs import logger [as 别名]
# 或者: from official.utils.logs.logger import config_benchmark_logger [as 别名]
def test_config_benchmark_file_logger(self):
    # Set the benchmark_log_dir first since the benchmark_logger_type will need
    # the value to be set when it does the validation.
    with flagsaver.flagsaver(benchmark_log_dir="/tmp"):
      with flagsaver.flagsaver(benchmark_logger_type="BenchmarkFileLogger"):
        logger.config_benchmark_logger()
        self.assertIsInstance(logger.get_benchmark_logger(),
                              logger.BenchmarkFileLogger) 
开发者ID:IntelAI,项目名称:models,代码行数:10,代码来源:logger_test.py

示例3: test_config_benchmark_bigquery_logger

# 需要导入模块: from official.utils.logs import logger [as 别名]
# 或者: from official.utils.logs.logger import config_benchmark_logger [as 别名]
def test_config_benchmark_bigquery_logger(self, mock_bigquery_client):
    with flagsaver.flagsaver(benchmark_logger_type="BenchmarkBigQueryLogger"):
      logger.config_benchmark_logger()
      self.assertIsInstance(logger.get_benchmark_logger(),
                            logger.BenchmarkBigQueryLogger) 
开发者ID:IntelAI,项目名称:models,代码行数:7,代码来源:logger_test.py

示例4: test_config_base_benchmark_logger

# 需要导入模块: from official.utils.logs import logger [as 别名]
# 或者: from official.utils.logs.logger import config_benchmark_logger [as 别名]
def test_config_base_benchmark_logger(self):
    with flagsaver.flagsaver(benchmark_logger_type='BaseBenchmarkLogger'):
      logger.config_benchmark_logger()
      self.assertIsInstance(logger.get_benchmark_logger(),
                            logger.BaseBenchmarkLogger) 
开发者ID:rockyzhengwu,项目名称:nsfw,代码行数:7,代码来源:logger_test.py

示例5: test_config_benchmark_file_logger

# 需要导入模块: from official.utils.logs import logger [as 别名]
# 或者: from official.utils.logs.logger import config_benchmark_logger [as 别名]
def test_config_benchmark_file_logger(self):
    # Set the benchmark_log_dir first since the benchmark_logger_type will need
    # the value to be set when it does the validation.
    with flagsaver.flagsaver(benchmark_log_dir='/tmp'):
      with flagsaver.flagsaver(benchmark_logger_type='BenchmarkFileLogger'):
        logger.config_benchmark_logger()
        self.assertIsInstance(logger.get_benchmark_logger(),
                              logger.BenchmarkFileLogger) 
开发者ID:rockyzhengwu,项目名称:nsfw,代码行数:10,代码来源:logger_test.py

示例6: test_config_benchmark_bigquery_logger

# 需要导入模块: from official.utils.logs import logger [as 别名]
# 或者: from official.utils.logs.logger import config_benchmark_logger [as 别名]
def test_config_benchmark_bigquery_logger(self, mock_bigquery_client):
    with flagsaver.flagsaver(benchmark_logger_type='BenchmarkBigQueryLogger'):
      logger.config_benchmark_logger()
      self.assertIsInstance(logger.get_benchmark_logger(),
                            logger.BenchmarkBigQueryLogger) 
开发者ID:rockyzhengwu,项目名称:nsfw,代码行数:7,代码来源:logger_test.py

示例7: get_logging_metric_hook

# 需要导入模块: from official.utils.logs import logger [as 别名]
# 或者: from official.utils.logs.logger import config_benchmark_logger [as 别名]
def get_logging_metric_hook(benchmark_log_dir=None,
                            tensors_to_log=None,
                            every_n_secs=600,
                            **kwargs):  # pylint: disable=unused-argument
  """Function to get LoggingMetricHook.

  Args:
    benchmark_log_dir: `string`, directory path to save the metric log.
    tensors_to_log: List of tensor names or dictionary mapping labels to tensor
      names. If not set, log _TENSORS_TO_LOG by default.
    every_n_secs: `int`, the frequency for logging the metric. Default to every
      10 mins.

  Returns:
    Returns a ProfilerHook that writes out timelines that can be loaded into
    profiling tools like chrome://tracing.
  """
  logger.config_benchmark_logger(benchmark_log_dir)
  if tensors_to_log is None:
    tensors_to_log = _TENSORS_TO_LOG
  return metric_hook.LoggingMetricHook(
      tensors=tensors_to_log,
      metric_logger=logger.get_benchmark_logger(),
      every_n_secs=every_n_secs)


# A dictionary to map one hook name and its corresponding function 
开发者ID:itsamitgoel,项目名称:Gun-Detector,代码行数:29,代码来源:hooks_helper.py

示例8: test_config_base_benchmark_logger

# 需要导入模块: from official.utils.logs import logger [as 别名]
# 或者: from official.utils.logs.logger import config_benchmark_logger [as 别名]
def test_config_base_benchmark_logger(self):
    logger.config_benchmark_logger("")
    self.assertIsInstance(logger.get_benchmark_logger(),
                          logger.BaseBenchmarkLogger) 
开发者ID:itsamitgoel,项目名称:Gun-Detector,代码行数:6,代码来源:logger_test.py

示例9: test_config_benchmark_file_logger

# 需要导入模块: from official.utils.logs import logger [as 别名]
# 或者: from official.utils.logs.logger import config_benchmark_logger [as 别名]
def test_config_benchmark_file_logger(self):
    logger.config_benchmark_logger("/tmp/abc")
    self.assertIsInstance(logger.get_benchmark_logger(),
                          logger.BenchmarkFileLogger) 
开发者ID:itsamitgoel,项目名称:Gun-Detector,代码行数:6,代码来源:logger_test.py


注:本文中的official.utils.logs.logger.config_benchmark_logger方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。