Skip to content

Commit

Permalink
Enbale passing tests in quantiles_test.py (tensorflow#1224)
Browse files Browse the repository at this point in the history
* Enbale passing tests in quantiles_test.py
* Used self.skipTest.
  • Loading branch information
gabrieldemarmiesse authored Mar 7, 2020
1 parent 76ab382 commit 76c51de
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tensorflow_addons/losses/quantiles_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ def test_sample_weighted(self):
self.assertAlmostEqual(self.evaluate(loss), 40.7 / 6, 3)

def test_timestep_weighted(self):
self.skipTest("Failing. See https://github.com/tensorflow/addons/issues/1202")
pin_obj = quantiles.PinballLoss()
y_true = tf.constant([1, 9, 2, -5, -2, 6], shape=(2, 3, 1))
y_pred = tf.constant(
Expand All @@ -103,6 +104,7 @@ def test_zero_weighted(self):
self.assertAlmostEqual(self.evaluate(loss), 0.0, 3)

def test_invalid_sample_weight(self):
self.skipTest("Failing. See https://github.com/tensorflow/addons/issues/1202")
pin_obj = quantiles.PinballLoss()
y_true = tf.constant([1, 9, 2, -5, -2, 6], shape=(2, 3, 1))
y_pred = tf.constant([4, 8, 12, 8, 1, 3], shape=(2, 3, 1))
Expand All @@ -126,3 +128,7 @@ def test_sum_reduction(self):
y_pred = tf.constant([4, 8, 12, 8, 1, 3], shape=(2, 3), dtype=tf.dtypes.float32)
loss = pin_obj(y_true, y_pred, sample_weight=2.3)
self.assertAlmostEqual(self.evaluate(loss), 12.65, 3)


if __name__ == "__main__":
tf.test.main()

0 comments on commit 76c51de

Please sign in to comment.