-
Notifications
You must be signed in to change notification settings - Fork 617
Closed
Labels
Description
While converting the tests for skip_gram_ops, I noticed a test that was failing in TF2 eager execution, but I'm not sure why.
This test:
with self.assertRaises(ValueError):
invalid_tensor = constant_op.constant([[b"the"], [b"quick"], [b"brown"]])
text.skip_gram_sample(invalid_tensor)
Should raise an error because of this check in the op definition. When decorating with @test_util.run_deprecated_v1 the test correctly passes (error is raised), but otherwise it fails to raise an Error.
Is this related to inspecting the rank of EagerTensors? Or is something else at play?