Skip to content

[Bug] skip_gram_sample assert rank is 1 #12

@seanpmorgan

Description

@seanpmorgan

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtext

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions