Tfx: Schema and statistics in Transform TFX Pipeline Component

Created on 17 Sep 2019  路  5Comments  路  Source: tensorflow/tfx

The main entry point in Transform component (preprocessing_fn) should also provide computed Stats and Schema next to the inputs. In some scenarios users might want to benefit from the statistics e.g. to eliminate unnecessary features.

awaiting tensorflower feature

Most helpful comment

I'd like to re-up this request鈥攈aving easier access to the metadata and schema from within the Transform callback would be tremendously useful. Some feature transformations could depend on the inferred schema. Is there some other workaround?

All 5 comments

@wsuchy Can you please also try posting this issue in the tensorflow/transform as this feature also is primarily targeted towards transform component. Thanks!

Could you please expand on what this feature request is asking for?
Stats and transformed schema are computed by the Transform component, are you asking for easier access?

@zoyahav Indeed. Currently in the TFX Transform Pipeline Component the processing_fn has a signature of

processing_fn(inputs:Dict[tf.Tensor]) -> Dict[tf.Tensor]

and I am proposing to change it as follows:

processing_fn(inputs:Dict[tf.Tensor], metadata:DatasetMetadata, stats:DatasetFeatureStatisticsList ) -> Dict[tf.Tensor]

or even better, as a higher order function / factory:

processing_fn_factory(metadata:DatasetMetadata, stats:DatasetFeatureStatisticsList ) 
-> Callable[Dict[tf.Tensor], Dict[tf.Tensor]]

So now my processing function could depend on the stats and schema.
I know I could reach for it Stats and Schema manually, yet it requires me to talk to the SQLite database and keeping track of paths, etc.

I'd like to re-up this request鈥攈aving easier access to the metadata and schema from within the Transform callback would be tremendously useful. Some feature transformations could depend on the inferred schema. Is there some other workaround?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Mageswaran1989 picture Mageswaran1989  路  7Comments

ntakouris picture ntakouris  路  5Comments

casassg picture casassg  路  5Comments

valeriano-manassero picture valeriano-manassero  路  6Comments

tommywei110 picture tommywei110  路  5Comments