Try to fix flakiness by reducing the number of query construction.

PiperOrigin-RevId: 395552656
This commit is contained in:
Zheng Xu 2021-09-08 13:58:53 -07:00 committed by A. Unique TensorFlower
parent 06eef51369
commit c5f35b3ca1

View file

@ -221,9 +221,9 @@ class TreeCumulativeSumQueryTest(tf.test.TestCase, parameterized.TestCase):
_get_noise_generator),
)
def test_noisy_cumsum_and_state_update(self, records, value_generator):
num_trials = 200
record_specs = tf.TensorSpec([])
records = [tf.constant(r) for r in records]
num_trials, vector_size = 10, 100
record_specs = tf.TensorSpec([vector_size])
records = [tf.constant(r, shape=[vector_size]) for r in records]
noised_sums = []
for i in range(num_trials):
query = tree_aggregation_query.TreeCumulativeSumQuery(