Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-tensorflow-estimator for
openSUSE:Factory checked in at 2022-02-02 22:40:10
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-tensorflow-estimator (Old)
and /work/SRC/openSUSE:Factory/.python-tensorflow-estimator.new.1898 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-tensorflow-estimator"
Wed Feb 2 22:40:10 2022 rev:3 rq:950477 version:2.7.0
Changes:
--------
---
/work/SRC/openSUSE:Factory/python-tensorflow-estimator/python-tensorflow-estimator.changes
2022-01-06 15:51:52.212990592 +0100
+++
/work/SRC/openSUSE:Factory/.python-tensorflow-estimator.new.1898/python-tensorflow-estimator.changes
2022-02-02 22:40:24.495940746 +0100
@@ -1,0 +2,11 @@
+Sat Jan 22 20:42:33 UTC 2022 - Ben Greiner <[email protected]>
+
+- Release 2.7.0 for sync with tensorflow2
+ * Update README.md by @amahendrakar in #63
+ * Enable tracing in estimator training by @burgerkingeater in #68
+ * Fix distribute link error in train_and_evaluate function by
+ @daugraph in #71
+ * Disabling PY-test on the master. by @pranve in #77
+- Disable Leap/Backports build: no non-lite tensorflow2
+
+-------------------------------------------------------------------
Old:
----
tensorflow_estimator-2.6.0-py2.py3-none-any.whl
tensorflow_estimator-2.6.0.tar.gz
New:
----
tensorflow_estimator-2.7.0-py2.py3-none-any.whl
tensorflow_estimator-2.7.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-tensorflow-estimator.spec ++++++
--- /var/tmp/diff_new_pack.lRiZE8/_old 2022-02-02 22:40:25.075936815 +0100
+++ /var/tmp/diff_new_pack.lRiZE8/_new 2022-02-02 22:40:25.083936761 +0100
@@ -1,7 +1,7 @@
#
-# spec file for package python-tensorflow-estimator
+# spec file
#
-# Copyright (c) 2021 SUSE LLC
+# Copyright (c) 2022 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -27,8 +27,11 @@
%bcond_with alltests
# sync with tensorflow2
%define pythons python3
+%if 0%{?suse_version} < 1599
+ExclusiveArch: donotbuild
+%endif
Name: python-tensorflow-estimator%{psuffix}
-Version: 2.6.0
+Version: 2.7.0
Release: 0
Summary: TensorFlow Estimator API
License: Apache-2.0
@@ -47,16 +50,8 @@
BuildArch: noarch
ExcludeArch: %{ix86}
%if %{with test}
-# this should be specified by tf
-BuildRequires: %{python_module keras = %{version}}
BuildRequires: %{python_module tensorflow-estimator = %{version}}
-BuildRequires: %{python_module tensorboard = %{version}}
-%if 0%{?suse_version} < 1599
-# Leap 15.x / SLE15-SPx still use python 3.6
-BuildRequires: %{python_module typing_extensions}
-%endif
BuildRequires: %{python_module scikit-learn}
-#2.6+ allows "from tensorflow.python.profiler import trace"
BuildRequires: tensorflow2 >= 2.6
%endif
%python_subpackages
@@ -72,14 +67,11 @@
cp %{SOURCE99} .
%build
-%if ! %{with test}
-# deprecated usage of wheel in cwd for pyproject_install due to old
python-rpm-macros on Leap 15.X
-cp %{SOURCE0} .
-%endif
+:
%if ! %{with test}
%install
-%pyproject_install
+%pyproject_install %{SOURCE0}
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%endif
++++++ tensorflow_estimator-2.6.0.tar.gz -> tensorflow_estimator-2.7.0.tar.gz
++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/estimator-2.6.0/tensorflow_estimator/python/estimator/BUILD
new/estimator-2.7.0/tensorflow_estimator/python/estimator/BUILD
--- old/estimator-2.6.0/tensorflow_estimator/python/estimator/BUILD
2021-08-09 19:21:03.000000000 +0200
+++ new/estimator-2.7.0/tensorflow_estimator/python/estimator/BUILD
2021-10-08 20:52:27.000000000 +0200
@@ -1251,6 +1251,9 @@
python_version = "PY3",
shard_count = 4,
srcs_version = "PY3",
+ tags = [
+ "no_oss", # TODO(b/202525254): broken on TF 2.7
+ ],
deps = [
":dnn",
":head_utils",
@@ -1680,6 +1683,7 @@
name = "prediction_keys",
srcs = ["canned/prediction_keys.py"],
srcs_version = "PY3",
+ visibility = ["//visibility:public"],
deps = [],
)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/estimator-2.6.0/tensorflow_estimator/python/estimator/canned/linear_model_test.py
new/estimator-2.7.0/tensorflow_estimator/python/estimator/canned/linear_model_test.py
---
old/estimator-2.6.0/tensorflow_estimator/python/estimator/canned/linear_model_test.py
2021-08-09 19:21:03.000000000 +0200
+++
new/estimator-2.7.0/tensorflow_estimator/python/estimator/canned/linear_model_test.py
2021-10-08 20:52:27.000000000 +0200
@@ -1385,7 +1385,6 @@
class LinearModelLayerSerializationTest(tf.test.TestCase,
parameterized.TestCase):
@parameterized.named_parameters(
- ('default', 1, 'sum', None, None),
('trainable', 6, 'mean', True, 'trainable'),
('not_trainable', 10, 'sum', False, 'frozen'))
def test_get_config(self, units, sparse_combiner, trainable, name):
@@ -1407,7 +1406,6 @@
config['feature_columns'][1]['class_name'],
'IdentityCategoricalColumn')
@parameterized.named_parameters(
- ('default', 1, 'sum', None, None),
('trainable', 6, 'mean', True, 'trainable'),
('not_trainable', 10, 'sum', False, 'frozen'))
def test_from_config(self, units, sparse_combiner, trainable, name):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/estimator-2.6.0/tensorflow_estimator/python/estimator/early_stopping.py
new/estimator-2.7.0/tensorflow_estimator/python/estimator/early_stopping.py
--- old/estimator-2.6.0/tensorflow_estimator/python/estimator/early_stopping.py
2021-08-09 19:21:03.000000000 +0200
+++ new/estimator-2.7.0/tensorflow_estimator/python/estimator/early_stopping.py
2021-10-08 20:52:27.000000000 +0200
@@ -440,15 +440,14 @@
os.path.join(eval_dir, _EVENT_FILE_GLOB_PATTERN)):
try:
for event in tf.compat.v1.train.summary_iterator(event_file):
- tf.compat.v1.logging.info('Yielding event: %s', event)
yield event
except tf.errors.DataLossError as e:
# Upon DataLossError, we ignore the rest of the file and go to the next
# one.
tf.compat.v1.logging.warning(
- 'Ignoring data corruption error encountered while reading file: '
- '%s; original error raised by `tf.train.summary_iterator`: %s',
- event_file, e)
+ 'Skipping rest of the file due to encountering data corruption '
+ 'error; file path: %s; original error raised by '
+ '`tf.train.summary_iterator`: %s', event_file, e)
def _get_or_create_stop_var():
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/estimator-2.6.0/tensorflow_estimator/python/estimator/estimator.py
new/estimator-2.7.0/tensorflow_estimator/python/estimator/estimator.py
--- old/estimator-2.6.0/tensorflow_estimator/python/estimator/estimator.py
2021-08-09 19:21:03.000000000 +0200
+++ new/estimator-2.7.0/tensorflow_estimator/python/estimator/estimator.py
2021-10-08 20:52:27.000000000 +0200
@@ -49,6 +49,7 @@
from tensorflow.python.util import function_utils
from tensorflow.python.util import tf_contextlib
from tensorflow.python.util.tf_export import estimator_export
+from tensorflow.tools.docs import doc_controls
from tensorflow_estimator.python.estimator import model_fn as model_fn_lib
from tensorflow_estimator.python.estimator import run_config
from tensorflow_estimator.python.estimator import util as estimator_util
@@ -66,6 +67,15 @@
@estimator_export(v1=['estimator.Estimator'])
+@doc_controls.inheritable_header("""\
+ Warning: Estimators are not recommended for new code. Estimators run
+ `v1.Session`-style code which is more difficult to write correctly, and
+ can behave unexpectedly, especially when combined with TF 2 code. Estimators
+ do fall under our
+ [compatibility guarantees](https://tensorflow.org/guide/versions), but will
+ receive no fixes other than security vulnerabilities. See the
+ [migration guide](https://tensorflow.org/guide/migrate) for details.
+ """)
class Estimator(object):
"""Estimator class to train and evaluate TensorFlow models.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/estimator-2.6.0/tensorflow_estimator/python/estimator/model_fn_test.py
new/estimator-2.7.0/tensorflow_estimator/python/estimator/model_fn_test.py
--- old/estimator-2.6.0/tensorflow_estimator/python/estimator/model_fn_test.py
2021-08-09 19:21:03.000000000 +0200
+++ new/estimator-2.7.0/tensorflow_estimator/python/estimator/model_fn_test.py
2021-10-08 20:52:27.000000000 +0200
@@ -509,7 +509,8 @@
with tf.Graph().as_default(), self.cached_session():
predictions = {'loss': tf.constant(1.)}
classes = tf.constant('hello')
- with self.assertRaisesRegexp(TypeError, 'export_outputs must be dict'):
+ with self.assertRaisesRegexp(TypeError,
+ '[`]*export_outputs[`]* must be dict'):
model_fn.EstimatorSpec(
mode=ModeKeys.PREDICT,
predictions=predictions,
@@ -519,9 +520,8 @@
with tf.Graph().as_default(), self.cached_session():
predictions = {'loss': tf.constant(1.)}
with self.assertRaisesRegexp(
- TypeError, r'Values in export_outputs must be ExportOutput objects. '
- r"Given: {'head_name': {'loss': <tf.Tensor 'Const:0' shape=\(\) "
- r'dtype=float32>}}'):
+ TypeError,
+ r'Values in [`]*export_outputs[`]* must be ExportOutput objects.'):
model_fn.EstimatorSpec(
mode=ModeKeys.PREDICT,
predictions=predictions,
@@ -580,10 +580,7 @@
export_output.PredictOutput(outputs={'some_output_3': output_3})
}
with self.assertRaisesRegexp(
- ValueError,
- 'Multiple export_outputs were provided, but none of them is '
- 'specified as the default. Do this by naming one of them with '
- 'signature_constants.DEFAULT_SERVING_SIGNATURE_DEF_KEY.'):
+ ValueError, 'Multiple [`]*export_outputs[`]* were provided'):
model_fn.EstimatorSpec(
mode=ModeKeys.PREDICT,
predictions=predictions,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/estimator-2.6.0/tensorflow_estimator/python/estimator/tpu/BUILD
new/estimator-2.7.0/tensorflow_estimator/python/estimator/tpu/BUILD
--- old/estimator-2.6.0/tensorflow_estimator/python/estimator/tpu/BUILD
2021-08-09 19:21:03.000000000 +0200
+++ new/estimator-2.7.0/tensorflow_estimator/python/estimator/tpu/BUILD
2021-10-08 20:52:27.000000000 +0200
@@ -177,6 +177,7 @@
size = "medium",
srcs = ["tpu_estimator_input_v2_test.py"],
disable_experimental = True,
+ disable_tfrt = True, # TODO(b/198521331)
malloc = "//third_party/tcmalloc:tcmalloc_or_debug",
srcs_version = "PY3",
deps = [
@@ -236,6 +237,7 @@
srcs_version = "PY3",
deps = [
":tpu_estimator",
+ "//tensorflow_estimator/python/estimator:expect_absl_installed",
"//tensorflow_estimator/python/estimator:expect_tensorflow_installed",
"//third_party/tensorflow/contrib/summary",
],
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/estimator-2.6.0/tensorflow_estimator/python/estimator/tpu/_tpu_estimator_embedding.py
new/estimator-2.7.0/tensorflow_estimator/python/estimator/tpu/_tpu_estimator_embedding.py
---
old/estimator-2.6.0/tensorflow_estimator/python/estimator/tpu/_tpu_estimator_embedding.py
2021-08-09 19:21:03.000000000 +0200
+++
new/estimator-2.7.0/tensorflow_estimator/python/estimator/tpu/_tpu_estimator_embedding.py
2021-10-08 20:52:27.000000000 +0200
@@ -87,7 +87,7 @@
scope_name = scope_name + '/'
if isinstance(optimization_parameters,
tf.compat.v1.tpu.experimental.AdagradParameters):
- return tpu_embedding.AdagradSlotVariableName('{}{}/Adagrad'.format(
+ return tpu_embedding.AdagradSlotVariableNames('{}{}/Adagrad'.format(
scope_name, var_name))
elif isinstance(optimization_parameters,
tf.compat.v1.tpu.experimental.AdamParameters):
@@ -96,11 +96,11 @@
'{}{}/Adam/v'.format(scope_name, var_name))
elif isinstance(optimization_parameters,
tf.compat.v1.tpu.experimental.FtrlParameters):
- return tpu_embedding.FtrlSlotVariableName(
+ return tpu_embedding.FtrlSlotVariableNames(
'{}{}/Ftrl'.format(scope_name, var_name), # accumulator
'{}{}/Ftrl_1'.format(scope_name, var_name)) # linear
elif isinstance(optimization_parameters, MomentumParameters):
- return tpu_embedding.MomentumSlotVariableName('{}{}/Momentum'.format(
+ return tpu_embedding.MomentumSlotVariableNames('{}{}/Momentum'.format(
scope_name, var_name))
elif isinstance(optimization_parameters, RMSPropParameters):
return tpu_embedding.RMSPropSlotVariableNames(
@@ -108,9 +108,8 @@
mom='{}{}/RMSProp/mom'.format(scope_name, var_name),
)
elif isinstance(optimization_parameters, ProximalAdagradParameters):
- return tpu_embedding.ProximalAdagradSlotVariableName(
- '{}{}/ProximalAdagrad'.format(scope_name, var_name)
- )
+ return tpu_embedding.ProximalAdagradSlotVariableNames(
+ '{}{}/ProximalAdagrad'.format(scope_name, var_name))
elif isinstance(
optimization_parameters,
tf.compat.v1.tpu.experimental.StochasticGradientDescentParameters):
@@ -297,15 +296,16 @@
embedding IDs per example and how well the embedding IDs are load
balanced across the system. The lookup statistics are used during TPU
initialization for embedding table partitioning. Collection of lookup
- statistics is done at runtime by profiling the embedding inputs: only
- 3% of input samples are profiled to minimize host CPU overhead. Once
- a suitable number of samples are profiled, the lookup statistics are
- saved to table-specific files in the profile data directory generally
- at the end of a TPU training loop. The filename corresponding to each
- table is obtained by hashing table specific parameters (e.g., table
- name and number of features) and global configuration parameters (e.g.,
- sharding strategy and task count). The same profile data directory can
- be shared among several models to reuse embedding lookup statistics.
+ statistics is done at runtime by profiling the embedding inputs, only
a
+ small fraction of input samples are profiled to minimize host CPU
+ overhead. Once a suitable number of samples are profiled, the lookup
+ statistics are saved to table-specific files in the profile data
+ directory generally at the end of a TPU training loop. The filename
+ corresponding to each table is obtained by hashing table specific
+ parameters (e.g., table name and number of features) and global
+ configuration parameters (e.g., sharding strategy and task count). The
+ same profile data directory can be shared among several models to reuse
+ embedding lookup statistics.
Returns:
An `EmbeddingConfigSpec` instance.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/estimator-2.6.0/tensorflow_estimator/python/estimator/tpu/tpu_enqueue_sequence_test.py
new/estimator-2.7.0/tensorflow_estimator/python/estimator/tpu/tpu_enqueue_sequence_test.py
---
old/estimator-2.6.0/tensorflow_estimator/python/estimator/tpu/tpu_enqueue_sequence_test.py
2021-08-09 19:21:03.000000000 +0200
+++
new/estimator-2.7.0/tensorflow_estimator/python/estimator/tpu/tpu_enqueue_sequence_test.py
2021-10-08 20:52:27.000000000 +0200
@@ -16,13 +16,16 @@
import os
from typing import Dict, List, Text, Tuple
+from absl import flags
+from absl.testing import parameterized
import numpy as np
import tensorflow.compat.v1 as tf
from tensorflow.contrib import summary as contrib_summary
+FLAGS = flags.FLAGS
-class TPUEnqueueSequenceTest(tf.test.TestCase):
+class TPUEnqueueSequenceTest(tf.test.TestCase, parameterized.TestCase):
def setUp(self):
super().setUp()
@@ -49,6 +52,7 @@
batch_size: int,
max_sequence_length: int,
dimension: int,
+ combiner: Text = 'mean',
) -> Tuple[tf.Tensor, tf.Tensor]:
"""Gets the activations and seq lengths for a batch of sparse IDs.
@@ -66,6 +70,7 @@
max_sequence_length: The size of the second dimension of sparse_ids.
dimension: The embedding dimension size (number of floats for each
embedding ID).
+ combiner: The embedding column combiner (used for multivalent features).
Returns:
A tuple containing:
@@ -88,6 +93,7 @@
dimension=dimension,
max_sequence_length=max_sequence_length,
initializer=tf.constant_initializer(embedding_weights),
+ combiner=combiner,
)
# Add an SGD optimizer. This choice is arbitrary for computing activations.
@@ -360,6 +366,104 @@
],
sequence_lengths,
)
+
+ @parameterized.named_parameters(
+ ('sum_combiner', 'sum'),
+ ('mean_combiner', 'mean'),
+ )
+ def test_multivalent_sequence_features(self, combiner: Text):
+ """Tests multivalent sequence embedding features.
+
+ Args:
+ combiner: The combiner used to reduce multivalent features. A
multivalent
+ sequence can have many IDs per sequence index. The input for
+ multivalent sequence features is a 3D SparseTensor (instead of a 2D
+ SparseTensor for univalent sequence features). The last dimension
+ represents the index that will be reduced (using the combiner).
+ """
+ batch_size = 4
+ max_sequence_length = 3
+ dimension = 1
+ embedding_weights = np.float32([
+ [-5.], # embedding ID = 0
+ [10.], # embedding ID = 1
+ [20.], # embedding ID = 2
+ [30.], # embedding ID = 3
+ [40.], # embedding ID = 4
+ [50.], # embedding ID = 5
+ ])
+
+ # For multivalent sequence features, IDs are a 3D sparse tensor.
+ # The outer dimension is batch, the middle dimension is sequence, and the
+ # last dimension is the index.
+ sparse_ids = tf.SparseTensorValue(
+ indices=[
+ [0, 0, 0],
+ [0, 0, 1],
+ [1, 0, 0],
+ [1, 1, 0],
+ [3, 0, 0],
+ [3, 2, 0],
+ [3, 2, 1],
+ [3, 3, 0],
+ ],
+ values=[
+ 1, # Example 0, sequence_index 0, id_index 0.
+ 0, # Example 0, sequence_index 0, id_index 1.
+ 2, # Example 1, sequence_index 0, id_index 0.
+ 3, # Example 1, sequence_index 1, id_index 0.
+ 4, # Example 3, sequence_index 0, id_index 0.
+ 5, # Example 3, sequence_index 2. id_index 0.
+ 2, # Example 3, sequence_index 2. id_index 1.
+ 5, # Example 3, sequence_index 3, id_index 0.
+ ],
+ dense_shape=[batch_size, max_sequence_length + 1, 2],
+ )
+
+ activations, sequence_lengths = self.get_activations_and_sequence_lengths(
+ embedding_weights,
+ sparse_ids,
+ batch_size,
+ max_sequence_length,
+ dimension,
+ combiner=combiner,
+ )
+
+ self.assertAllEqual(
+ [
+ [ # Example 0
+ [5 if combiner == 'sum' else 2.5], # Sequence Index = 0.
+ [0.], # Sequence Index = 1.
+ [0.], # Sequence Index = 2.
+ ],
+ [ # Example 1
+ [20], # Sequence Index = 0.
+ [30], # Sequence Index = 1.
+ [0.], # Sequence Index = 2.
+ ],
+ [ # Example 2
+ [0.], # Sequence Index = 0.
+ [0.], # Sequence Index = 1.
+ [0.], # Sequence Index = 2.
+ ],
+ [ # Example 3
+ [40], # Sequence Index = 0.
+ [0.], # Sequence Index = 1.
+ [70 if combiner == 'sum' else 35], # Sequence Index = 2.
+ ],
+ ],
+ activations,
+ )
+
+ self.assertAllEqual(
+ [
+ 1, # Example 0
+ 2, # Example 1
+ 0, # Example 2
+ 3, # Example 3
+ ],
+ sequence_lengths,
+ )
if __name__ == '__main__':
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/estimator-2.6.0/tensorflow_estimator/tools/pip_package/setup.py
new/estimator-2.7.0/tensorflow_estimator/tools/pip_package/setup.py
--- old/estimator-2.6.0/tensorflow_estimator/tools/pip_package/setup.py
2021-08-09 19:21:03.000000000 +0200
+++ new/estimator-2.7.0/tensorflow_estimator/tools/pip_package/setup.py
2021-10-08 20:52:27.000000000 +0200
@@ -30,7 +30,7 @@
# This version string is semver compatible, but incompatible with pip.
# For pip, we will remove all '-' characters from this string, and use the
# result for pip.
-_VERSION = '2.6.0'
+_VERSION = '2.7.0'
REQUIRED_PACKAGES = [
# We depend on TensorFlow's declared pip dependencies.