gematria icon indicating copy to clipboard operation
gematria copied to clipboard

Switch all uses of pybind's `py::enum_` to `py::native_enum`.

Open virajbshah opened this issue 10 months ago • 1 comments

  • Switches the following uses of the now deprecated py::enum_ to py::native_enum:
    • basic_block.OperandType
    • graph_builder.NodeType
    • graph_builder.EdgeType
    • oov_token_behavior.BehaviorType
    • bhive_to_exegesis.AnnotatorType
  • Updates any usages of these types to take advantage of the full native Enum interface.
  • The downside is that py::native_enum does not take an Enum-level docstring. Member-level docstrings are kept.

virajbshah avatar Apr 14 '25 09:04 virajbshah

It seems like bumping pybind11 causes some incompatibility with TensorFlow's usage of pybind11_absl. It'll probably take some investigating to figure out.

virajbshah avatar Apr 14 '25 15:04 virajbshah