Closed TimSmole closed 5 years ago
@TimSmole I have encountered this as well, and for now the workaround is just to remove these fields from your schema before saving it.
for feature in schema.feature:
if feature.HasField('bool_domain'):
feature.ClearField('bool_domain')
Thanks for reporting this, we're aware of this issue and will be working with the tensorflow-data-validation team to resolve it.
This was a breaking change in tensorflow-trasnform 0.9, from the release notes: https://github.com/tensorflow/transform/releases/tag/v0.9.0
We now validate a Schema in its constructor to make sure that it can be converted to a feature spec. In particular only tf.int64, tf.string and tf.float32 types are allowed.
This limitation can be worked around for now by for example using an integer type (tf.int64) and validating that the values are either 0 or 1.
int_domain { min: 0 max: 1 }
Closing this issue as it has been answered. Please update the issue when new information becomes available, and we will reopen the issue. Thanks!
I am having trouble reading schema a simple schema that contains only one boolean feature. The schema was generated with
tfdv.infer_schema
function and saved to file usingtfdv.write_schema_text
function. The file looks like this:When I try to read it in the following way:
I get the following ValueError:
Debugging shows that _set_domain function supports only IntDomain, StringDomain and FloatDomain, but not BoolDomain and other (StructDomain, NaturalLanguageDomain, ImageDomain, MIDDomain, URLDomain, TimeDomain).
Is there a reason for this? Is this still work in progress, should it be considered as a bug or am I missing something?
I am using: