Skip to content

Conversation

@dsmilkov
Copy link
Contributor

@dsmilkov dsmilkov commented Sep 13, 2019

Fix access to the proto enum fields. Only newest protobuf version allows enum constants to be accessed via the enum name. However, if users have already installed an older version of protobuf which satisfies requirement constraints of tensorflowjs, they will get the following error:

File "/usr/local/lib/python3.6/dist-packages/tensorflowjs/converters/fuse_prelu.py", line 42, in register_prelu_op
value.list.type.extend([types_pb2.DataType.DT_FLOAT])
AttributeError: 'EnumTypeWrapper' object has no attribute 'DT_FLOAT'

Also freeze the version of a transitive dependency, gast. gast 0.3 introduced breaking API changes and the python TensorFlow requirement is relaxed.


This change is Reviewable

@dsmilkov dsmilkov changed the title WIP Fix proto bug Fix access to proto enum fields Sep 14, 2019
Copy link
Contributor

@nsthorat nsthorat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 2 of 2 files at r1.
Reviewable status: :shipit: complete! 1 of 1 approvals obtained

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants