From e24d60f045ba67a67306712d4797cf36fdf661a6 Mon Sep 17 00:00:00 2001 From: Alan Yee Date: Wed, 9 Aug 2017 10:06:23 -0700 Subject: [PATCH] Update to monitors and tutorial (#11920) * Update wide.md Removing unnecessary slash * Update monitors.py Removed tf.learn.SessionRunHook in favor of tf.train.SessionRunHook. * Update wide.md Remove bad practice of sudo pip * Update wide.md Replace OS X with macOS * Update bigquery_reader_ops.py Fixed error in example code * Update tensor_util.py Spaced import statements according to PEP 8 * Update tensor_util_test.py Spaced the import statements according to PEP 8 --- .../contrib/framework/python/framework/tensor_util.py | 2 ++ .../contrib/framework/python/framework/tensor_util_test.py | 2 ++ tensorflow/contrib/learn/python/learn/monitors.py | 2 +- tensorflow/docs_src/tutorials/wide.md | 6 +++--- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/tensorflow/contrib/framework/python/framework/tensor_util.py b/tensorflow/contrib/framework/python/framework/tensor_util.py index ec68d3b170ed3f..8839da2947aff5 100644 --- a/tensorflow/contrib/framework/python/framework/tensor_util.py +++ b/tensorflow/contrib/framework/python/framework/tensor_util.py @@ -17,7 +17,9 @@ from __future__ import absolute_import from __future__ import division from __future__ import print_function + import numpy as np + from tensorflow.python.framework import dtypes from tensorflow.python.framework import ops from tensorflow.python.framework import sparse_tensor diff --git a/tensorflow/contrib/framework/python/framework/tensor_util_test.py b/tensorflow/contrib/framework/python/framework/tensor_util_test.py index bc6bc952ee47e7..2effe8eb26e98c 100644 --- a/tensorflow/contrib/framework/python/framework/tensor_util_test.py +++ b/tensorflow/contrib/framework/python/framework/tensor_util_test.py @@ -20,7 +20,9 @@ from __future__ import print_function import re + import numpy as np + from tensorflow.contrib.framework.python.framework import tensor_util from tensorflow.contrib.framework.python.ops import variables as variables_lib2 from tensorflow.python.framework import constant_op diff --git a/tensorflow/contrib/learn/python/learn/monitors.py b/tensorflow/contrib/learn/python/learn/monitors.py index d9d22485eeafe7..9ef254b9817f5b 100644 --- a/tensorflow/contrib/learn/python/learn/monitors.py +++ b/tensorflow/contrib/learn/python/learn/monitors.py @@ -44,7 +44,6 @@ from tensorflow.contrib.framework import deprecated from tensorflow.contrib.framework.python.ops import variables as contrib_variables -from tensorflow.contrib.learn.python.learn import session_run_hook from tensorflow.contrib.learn.python.learn.summary_writer_cache import SummaryWriterCache from tensorflow.core.framework.summary_pb2 import Summary from tensorflow.core.util.event_pb2 import SessionLog @@ -52,6 +51,7 @@ from tensorflow.python.framework import ops from tensorflow.python.platform import tf_logging as logging from tensorflow.python.training import saver as saver_lib +from tensorflow.python.training import session_run_hook from tensorflow.python.training import summary_io from tensorflow.python.util import deprecation from tensorflow.python.util import tf_inspect diff --git a/tensorflow/docs_src/tutorials/wide.md b/tensorflow/docs_src/tutorials/wide.md index fdf43955eafbde..3571a55a2eccd2 100644 --- a/tensorflow/docs_src/tutorials/wide.md +++ b/tensorflow/docs_src/tutorials/wide.md @@ -24,13 +24,13 @@ To try the code for this tutorial: # Ubuntu/Linux 64-bit $ sudo apt-get install python-pip python-dev - # Mac OS X + # macOS $ sudo easy_install pip $ sudo easy_install --upgrade six b. Use `pip` to install pandas: - $ sudo pip install pandas + $ pip install -U pandas If you have trouble installing pandas, consult the [instructions](http://pandas.pydata.org/pandas-docs/stable/install.html) @@ -127,7 +127,7 @@ Here's a list of columns available in the Census Income dataset: : : : individual. : | income | Categorical | ">50K" or "<=50K", meaning | : : : whether the person makes more : -: : : than \$50,000 annually. : +: : : than $50,000 annually. : ## Converting Data into Tensors