You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have created a schema using SchemaGen. I want to update one of the fields from required to optional. How can I do that? https://www.tensorflow.org/tfx/tutorials/tfx/components_keras in this tutorial, every field is required. How can I make one of the fields optional.
Another question is how do I access the "domain" information from context.show(schema_gen.outputs['schema'])
programmatically.
The text was updated successfully, but these errors were encountered:
Changing schema feature from optional to required and vice versa
first get the feature from the schema
feature = tfdv.get_feature(schema, feature_name) # this will be the column
for changing from required to optional add a value between 0.0 to 1.0
feature.presence.min_fraction = 0.9
for changing from optional to required
feature.presence.min_fraction = 1.0
display the schema to check if the changes have occured as desired
tfdv.display_schema(schema)
Getting the domain values from SchemaGen
This may be a workaround for now. When you run the context, you will get a URI for the run metadata. You can also get it by running this -> schema_gen.outputs['schema'].to_json_dict()['artifacts'][0]['artifact']['uri'] + '/schema.pbtxt'
I have created a schema using SchemaGen. I want to update one of the fields from required to optional. How can I do that?
https://www.tensorflow.org/tfx/tutorials/tfx/components_keras in this tutorial, every field is required. How can I make one of the fields optional.
Another question is how do I access the "domain" information from context.show(schema_gen.outputs['schema'])
programmatically.
The text was updated successfully, but these errors were encountered: