diff options
author | Justine Tunney <jart@google.com> | 2017-12-07 16:16:36 -0800 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2017-12-07 16:21:34 -0800 |
commit | 6c4af6202c3984d7eabc8044c43579315c4b07a2 (patch) | |
tree | 3fcc6332f12604deecd91fd84b073897a1d04852 /tensorflow/contrib/summary | |
parent | 6e04085f90c5c0c2a49723cc682b16327c994957 (diff) |
Make SQLite random IDs unique across tables
We now have an invariant that no two IDs are the same across tables. We
also assume that only one instance will ever write tensors to a given
run. This approach to IDs also allows us to be more carefree about
garbage data, so we don't need the transactions anymore. It also brings
latency down from 16ms to 8ms.
Name Cold ?s Average ?s Flushing ?s Size B
?i.i 10,020 264 0 0
Scalar 1.0 FS 7,996 711 4,808 11,348
Scalar 1.0 TB FS 14,875 891 5,487 17,023
Scalar 2.0 FS 13,123 891 4,499 11,348
Scalar 2.0 DB 72,497 8,472 8,875 118,784
Tensor 1.0 FS 4 16,128 856 4,785 14,215
Tensor 2.0 FS 4 23,765 1,032 4,508 24,455
Tensor 2.0 DB 4 91,735 8,407 8,175 118,784
Tensor 1.0 FS 128 18,592 831 4,950 47,111
Tensor 2.0 FS 128 18,174 1,033 4,498 57,351
Tensor 2.0 DB 128 98,045 17,799 8,710 118,784
Tensor 1.0 FS 8192 19,225 1,164 5,217 2,119,816
Tensor 2.0 FS 8192 16,979 921 4,360 2,130,056
Tensor 2.0 DB 8192 108,704 8,470 8,543 126,976
PiperOrigin-RevId: 178312341
Diffstat (limited to 'tensorflow/contrib/summary')
-rw-r--r-- | tensorflow/contrib/summary/summary_ops_test.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tensorflow/contrib/summary/summary_ops_test.py b/tensorflow/contrib/summary/summary_ops_test.py index 0b8e0b967c..4ef03434b7 100644 --- a/tensorflow/contrib/summary/summary_ops_test.py +++ b/tensorflow/contrib/summary/summary_ops_test.py @@ -140,6 +140,7 @@ class DbTest(summary_test_util.SummaryDbTest): def testIntegerSummaries(self): step = training_util.create_global_step() + writer = self.create_db_writer() def adder(x, y): state_ops.assign_add(step, 1) @@ -150,7 +151,7 @@ class DbTest(summary_test_util.SummaryDbTest): return sum_ with summary_ops.always_record_summaries(): - with self.create_db_writer().as_default(): + with writer.as_default(): self.assertEqual(5, adder(int64(2), int64(3)).numpy()) six.assertCountEqual(self, [1, 1, 1], @@ -162,7 +163,7 @@ class DbTest(summary_test_util.SummaryDbTest): sum_id = get_one(self.db, 'SELECT tag_id FROM Tags WHERE tag_name = "sum"') with summary_ops.always_record_summaries(): - with self.create_db_writer().as_default(): + with writer.as_default(): self.assertEqual(9, adder(int64(4), int64(5)).numpy()) six.assertCountEqual(self, [1, 1, 1, 2, 2, 2], |