spotify/magnolify

Add method to `ExampleType` to return the tf.schema

martinbomio opened this issue · 0 comments

When you need to work with tf.example, especially when you are writing them, you often also want to store the tf.schema which describes that particular tf.example dataset. It would be useful to add a methof to ExampleType which returns such tf.schema. Something like:

sealed trait ExampleType[T] extends Converter[T, Example, Example.Builder] {
   ...
  def schema: Schema
}

It is important to note that the returned schema object will only contain information about the names of the fields, and their types, it cannot contain any statistics information.