"git@developer.sourcefind.cn:hehl2/torchaudio.git" did not exist on "6b07bcf80fafd77cb8bee32c316ce8b55323b868"
Unverified Commit a0e3604f authored by Karmel Allison's avatar Karmel Allison Committed by GitHub
Browse files

Rename logging directory (#3860)

* Updating name of logging package to avoid overwriting Python builtin logging.

* Updating name of logging package to avoid overwriting Python builtin logging.
parent 8d6663c7
...@@ -24,7 +24,7 @@ import tensorflow as tf # pylint: disable=g-bad-import-order ...@@ -24,7 +24,7 @@ import tensorflow as tf # pylint: disable=g-bad-import-order
from official.mnist import dataset from official.mnist import dataset
from official.utils.arg_parsers import parsers from official.utils.arg_parsers import parsers
from official.utils.logging import hooks_helper from official.utils.logs import hooks_helper
LEARNING_RATE = 1e-4 LEARNING_RATE = 1e-4
......
...@@ -31,8 +31,8 @@ import tensorflow as tf # pylint: disable=g-bad-import-order ...@@ -31,8 +31,8 @@ import tensorflow as tf # pylint: disable=g-bad-import-order
from official.resnet import resnet_model from official.resnet import resnet_model
from official.utils.arg_parsers import parsers from official.utils.arg_parsers import parsers
from official.utils.export import export from official.utils.export import export
from official.utils.logging import hooks_helper from official.utils.logs import hooks_helper
from official.utils.logging import logger from official.utils.logs import logger
################################################################################ ################################################################################
......
...@@ -132,7 +132,7 @@ class BaseParser(argparse.ArgumentParser): ...@@ -132,7 +132,7 @@ class BaseParser(argparse.ArgumentParser):
"Example: --hooks LoggingTensorHook ExamplesPerSecondHook. " "Example: --hooks LoggingTensorHook ExamplesPerSecondHook. "
"Allowed hook names (case-insensitive): LoggingTensorHook, " "Allowed hook names (case-insensitive): LoggingTensorHook, "
"ProfilerHook, ExamplesPerSecondHook, LoggingMetricHook." "ProfilerHook, ExamplesPerSecondHook, LoggingMetricHook."
"See official.utils.logging.hooks_helper for details.", "See official.utils.logs.hooks_helper for details.",
metavar="<HK>" metavar="<HK>"
) )
......
...@@ -31,10 +31,10 @@ import uuid ...@@ -31,10 +31,10 @@ import uuid
from google.cloud import bigquery from google.cloud import bigquery
import tensorflow as tf # pylint: disable=g-bad-import-order import tensorflow as tf # pylint: disable=g-bad-import-order
from official.utils.arg_parsers import parsers from official.utils.arg_parsers import parsers
from official.utils.logging import logger from official.utils.logs import logger
class BigQueryUploader(object): class BigQueryUploader(object):
......
...@@ -26,8 +26,8 @@ from __future__ import print_function ...@@ -26,8 +26,8 @@ from __future__ import print_function
import tensorflow as tf # pylint: disable=g-bad-import-order import tensorflow as tf # pylint: disable=g-bad-import-order
from official.utils.logging import hooks from official.utils.logs import hooks
from official.utils.logging import metric_hook from official.utils.logs import metric_hook
_TENSORS_TO_LOG = dict((x, x) for x in ['learning_rate', _TENSORS_TO_LOG = dict((x, x) for x in ['learning_rate',
'cross_entropy', 'cross_entropy',
......
...@@ -23,7 +23,7 @@ import unittest ...@@ -23,7 +23,7 @@ import unittest
import tensorflow as tf # pylint: disable=g-bad-import-order import tensorflow as tf # pylint: disable=g-bad-import-order
from official.utils.logging import hooks_helper from official.utils.logs import hooks_helper
class BaseTest(unittest.TestCase): class BaseTest(unittest.TestCase):
......
...@@ -24,7 +24,7 @@ import time ...@@ -24,7 +24,7 @@ import time
import tensorflow as tf # pylint: disable=g-bad-import-order import tensorflow as tf # pylint: disable=g-bad-import-order
from tensorflow.python.training import monitored_session # pylint: disable=g-bad-import-order from tensorflow.python.training import monitored_session # pylint: disable=g-bad-import-order
from official.utils.logging import hooks from official.utils.logs import hooks
tf.logging.set_verbosity(tf.logging.ERROR) tf.logging.set_verbosity(tf.logging.ERROR)
......
...@@ -26,7 +26,7 @@ import unittest ...@@ -26,7 +26,7 @@ import unittest
import tensorflow as tf # pylint: disable=g-bad-import-order import tensorflow as tf # pylint: disable=g-bad-import-order
from official.utils.logging import logger from official.utils.logs import logger
class BenchmarkLoggerTest(tf.test.TestCase): class BenchmarkLoggerTest(tf.test.TestCase):
......
...@@ -18,9 +18,9 @@ from __future__ import absolute_import ...@@ -18,9 +18,9 @@ from __future__ import absolute_import
from __future__ import division from __future__ import division
from __future__ import print_function from __future__ import print_function
import tensorflow as tf import tensorflow as tf # pylint: disable=g-bad-import-order
from official.utils.logging import logger from official.utils.logs import logger
class LoggingMetricHook(tf.train.LoggingTensorHook): class LoggingMetricHook(tf.train.LoggingTensorHook):
......
...@@ -24,15 +24,17 @@ import time ...@@ -24,15 +24,17 @@ import time
import tensorflow as tf import tensorflow as tf
from tensorflow.python.training import monitored_session from tensorflow.python.training import monitored_session
from official.utils.logging import metric_hook from official.utils.logs import metric_hook # pylint: disable=g-bad-import-order
class LoggingMetricHookTest(tf.test.TestCase): class LoggingMetricHookTest(tf.test.TestCase):
"""Tests for LoggingMetricHook."""
def setUp(self): def setUp(self):
super(LoggingMetricHookTest, self).setUp() super(LoggingMetricHookTest, self).setUp()
class MockMetricLogger(object): class MockMetricLogger(object):
def __init__(self): def __init__(self):
self.logged_metric = [] self.logged_metric = []
......
...@@ -25,7 +25,7 @@ import sys ...@@ -25,7 +25,7 @@ import sys
import tensorflow as tf # pylint: disable=g-bad-import-order import tensorflow as tf # pylint: disable=g-bad-import-order
from official.utils.arg_parsers import parsers from official.utils.arg_parsers import parsers
from official.utils.logging import hooks_helper from official.utils.logs import hooks_helper
_CSV_COLUMNS = [ _CSV_COLUMNS = [
'age', 'workclass', 'fnlwgt', 'education', 'education_num', 'age', 'workclass', 'fnlwgt', 'education', 'education_num',
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment