TensorFlow Extended (TFX) · TensorFlow Transform Estimator or Keras Model TensorFlow Model...
Transcript of TensorFlow Extended (TFX) · TensorFlow Transform Estimator or Keras Model TensorFlow Model...
![Page 1: TensorFlow Extended (TFX) · TensorFlow Transform Estimator or Keras Model TensorFlow Model Analysis TensorFlow Serving Logging Shared Utilities for Garbage Collection, Data Access](https://reader033.fdocuments.in/reader033/viewer/2022042518/5fa6b95fe94e654b474bb264/html5/thumbnails/1.jpg)
TensorFlow Extended (TFX)An End-to-End ML Platform
Clemens Mewald
![Page 2: TensorFlow Extended (TFX) · TensorFlow Transform Estimator or Keras Model TensorFlow Model Analysis TensorFlow Serving Logging Shared Utilities for Garbage Collection, Data Access](https://reader033.fdocuments.in/reader033/viewer/2022042518/5fa6b95fe94e654b474bb264/html5/thumbnails/2.jpg)
Figure 1: High-level component overview of a machine learning platform.
Data Ingestion
Data Analysis + Validation
Data Transformation Trainer Model Evaluation
and Validation Serving Logging
Shared Utilities for Garbage Collection, Data Access Controls
Pipeline Storage
Tuner
Shared Configuration Framework and Job Orchestration
Integrated Frontend for Job Management, Monitoring, Debugging, Data/Model/Evaluation Visualization
TensorFlow Extended (TFX): An End-to-End ML Platform
![Page 3: TensorFlow Extended (TFX) · TensorFlow Transform Estimator or Keras Model TensorFlow Model Analysis TensorFlow Serving Logging Shared Utilities for Garbage Collection, Data Access](https://reader033.fdocuments.in/reader033/viewer/2022042518/5fa6b95fe94e654b474bb264/html5/thumbnails/3.jpg)
TFX powers our most important bets and products...
(incl. )
Major ProductsAlphaBets
![Page 4: TensorFlow Extended (TFX) · TensorFlow Transform Estimator or Keras Model TensorFlow Model Analysis TensorFlow Serving Logging Shared Utilities for Garbage Collection, Data Access](https://reader033.fdocuments.in/reader033/viewer/2022042518/5fa6b95fe94e654b474bb264/html5/thumbnails/4.jpg)
Figure 1: High-level component overview of a machine learning platform.
Data Ingestion
TensorFlow Data Validation
TensorFlow Transform
Estimator or Keras Model
TensorFlow Model Analysis
TensorFlow Serving Logging
Shared Utilities for Garbage Collection, Data Access Controls
Pipeline Storage
Tuner
Shared Configuration Framework and Job Orchestration
Integrated Frontend for Job Management, Monitoring, Debugging, Data/Model/Evaluation Visualization
So far, we’ve made some of our libraries available.
![Page 5: TensorFlow Extended (TFX) · TensorFlow Transform Estimator or Keras Model TensorFlow Model Analysis TensorFlow Serving Logging Shared Utilities for Garbage Collection, Data Access](https://reader033.fdocuments.in/reader033/viewer/2022042518/5fa6b95fe94e654b474bb264/html5/thumbnails/5.jpg)
… and some of our most important partners.
![Page 6: TensorFlow Extended (TFX) · TensorFlow Transform Estimator or Keras Model TensorFlow Model Analysis TensorFlow Serving Logging Shared Utilities for Garbage Collection, Data Access](https://reader033.fdocuments.in/reader033/viewer/2022042518/5fa6b95fe94e654b474bb264/html5/thumbnails/6.jpg)
Figure 1: High-level component overview of a machine learning platform.
Data Ingestion
TensorFlow Data Validation
TensorFlow Transform
Estimator or Keras Model
TensorFlow Model Analysis
TensorFlow Serving Logging
Shared Utilities for Garbage Collection, Data Access Controls
Pipeline Storage
Tuner
Shared Configuration Framework and Job Orchestration
Integrated Frontend for Job Management, Monitoring, Debugging, Data/Model/Evaluation Visualization
So far, we’ve made some of our libraries available.
![Page 7: TensorFlow Extended (TFX) · TensorFlow Transform Estimator or Keras Model TensorFlow Model Analysis TensorFlow Serving Logging Shared Utilities for Garbage Collection, Data Access](https://reader033.fdocuments.in/reader033/viewer/2022042518/5fa6b95fe94e654b474bb264/html5/thumbnails/7.jpg)
Figure 1: High-level component overview of a machine learning platform.
Data Ingestion
TensorFlow Data Validation
TensorFlow Transform
Estimator or Keras Model
TensorFlow Model Analysis
TensorFlow Serving Logging
Shared Utilities for Garbage Collection, Data Access Controls
Pipeline Storage
Tuner
Shared Configuration Framework and Job Orchestration
Integrated Frontend for Job Management, Monitoring, Debugging, Data/Model/Evaluation Visualization
Today, we share the horizontal layers that integrate libraries in one product.
![Page 8: TensorFlow Extended (TFX) · TensorFlow Transform Estimator or Keras Model TensorFlow Model Analysis TensorFlow Serving Logging Shared Utilities for Garbage Collection, Data Access](https://reader033.fdocuments.in/reader033/viewer/2022042518/5fa6b95fe94e654b474bb264/html5/thumbnails/8.jpg)
Building Components out of Libraries
Data Ingestion TensorFlow Transform
Estimator or Keras Model
TensorFlow Model Analysis
Honoring Validation Outcomes
TensorFlow Data Validation
TensorFlow Serving
ExampleGen
StatisticsGen
SchemaGen
ExampleValidator
Transform Trainer
Evaluator
ModelValidator
Pusher Model Server
![Page 9: TensorFlow Extended (TFX) · TensorFlow Transform Estimator or Keras Model TensorFlow Model Analysis TensorFlow Serving Logging Shared Utilities for Garbage Collection, Data Access](https://reader033.fdocuments.in/reader033/viewer/2022042518/5fa6b95fe94e654b474bb264/html5/thumbnails/9.jpg)
What makes a Component
ModelValidator
Packaged binary or container
![Page 10: TensorFlow Extended (TFX) · TensorFlow Transform Estimator or Keras Model TensorFlow Model Analysis TensorFlow Serving Logging Shared Utilities for Garbage Collection, Data Access](https://reader033.fdocuments.in/reader033/viewer/2022042518/5fa6b95fe94e654b474bb264/html5/thumbnails/10.jpg)
What makes a Component
Last Validated Model
New (Candidate) Model
ModelValidator
Validation Outcome
Well defined inputs and outputs
![Page 11: TensorFlow Extended (TFX) · TensorFlow Transform Estimator or Keras Model TensorFlow Model Analysis TensorFlow Serving Logging Shared Utilities for Garbage Collection, Data Access](https://reader033.fdocuments.in/reader033/viewer/2022042518/5fa6b95fe94e654b474bb264/html5/thumbnails/11.jpg)
What makes a Component
Config
Last Validated Model
New (Candidate) Model
ModelValidator
Validation Outcome
Well definedconfiguration
![Page 12: TensorFlow Extended (TFX) · TensorFlow Transform Estimator or Keras Model TensorFlow Model Analysis TensorFlow Serving Logging Shared Utilities for Garbage Collection, Data Access](https://reader033.fdocuments.in/reader033/viewer/2022042518/5fa6b95fe94e654b474bb264/html5/thumbnails/12.jpg)
Metadata Store
What makes a Component
Config
Last Validated Model
New (Candidate) Model
ModelValidator
Validation Outcome
Context
![Page 13: TensorFlow Extended (TFX) · TensorFlow Transform Estimator or Keras Model TensorFlow Model Analysis TensorFlow Serving Logging Shared Utilities for Garbage Collection, Data Access](https://reader033.fdocuments.in/reader033/viewer/2022042518/5fa6b95fe94e654b474bb264/html5/thumbnails/13.jpg)
Metadata Store
What makes a Component
Trainer
Config
Last Validated Model
New (Candidate) Model
New ModelModel
Validator
Validation Outcome
Pusher
New (Candidate) Model
Validation Outcome
TensorFlow Serving
![Page 14: TensorFlow Extended (TFX) · TensorFlow Transform Estimator or Keras Model TensorFlow Model Analysis TensorFlow Serving Logging Shared Utilities for Garbage Collection, Data Access](https://reader033.fdocuments.in/reader033/viewer/2022042518/5fa6b95fe94e654b474bb264/html5/thumbnails/14.jpg)
Metadata Store? That’s new
![Page 15: TensorFlow Extended (TFX) · TensorFlow Transform Estimator or Keras Model TensorFlow Model Analysis TensorFlow Serving Logging Shared Utilities for Garbage Collection, Data Access](https://reader033.fdocuments.in/reader033/viewer/2022042518/5fa6b95fe94e654b474bb264/html5/thumbnails/15.jpg)
Trainer
Metadata Store? That’s new
Task-Aware Pipelines
Transform
![Page 16: TensorFlow Extended (TFX) · TensorFlow Transform Estimator or Keras Model TensorFlow Model Analysis TensorFlow Serving Logging Shared Utilities for Garbage Collection, Data Access](https://reader033.fdocuments.in/reader033/viewer/2022042518/5fa6b95fe94e654b474bb264/html5/thumbnails/16.jpg)
Trainer
Metadata Store? That’s new
Task-Aware Pipelines
Input DataTransformed
DataTrained Models
Serving System
Task- and Data-Aware Pipelines
Pipeline + Metadata Storage
Training Data
Transform TrainerTransform
![Page 17: TensorFlow Extended (TFX) · TensorFlow Transform Estimator or Keras Model TensorFlow Model Analysis TensorFlow Serving Logging Shared Utilities for Garbage Collection, Data Access](https://reader033.fdocuments.in/reader033/viewer/2022042518/5fa6b95fe94e654b474bb264/html5/thumbnails/17.jpg)
What’s in the Metadata Store?
Trained Models
Type definitions of Artifacts and their PropertiesE.g., Models, Data, Evaluation Metrics
![Page 18: TensorFlow Extended (TFX) · TensorFlow Transform Estimator or Keras Model TensorFlow Model Analysis TensorFlow Serving Logging Shared Utilities for Garbage Collection, Data Access](https://reader033.fdocuments.in/reader033/viewer/2022042518/5fa6b95fe94e654b474bb264/html5/thumbnails/18.jpg)
What’s in the Metadata Store?
Trained Models
Type definitions of Artifacts and their PropertiesE.g., Models, Data, Evaluation Metrics
Trainer Execution Records (Runs) of ComponentsE.g., Runtime Configuration, Inputs + Outputs
![Page 19: TensorFlow Extended (TFX) · TensorFlow Transform Estimator or Keras Model TensorFlow Model Analysis TensorFlow Serving Logging Shared Utilities for Garbage Collection, Data Access](https://reader033.fdocuments.in/reader033/viewer/2022042518/5fa6b95fe94e654b474bb264/html5/thumbnails/19.jpg)
What’s in the Metadata Store?
Trained Models
Type definitions of Artifacts and their PropertiesE.g., Models, Data, Evaluation Metrics
Trainer Execution Records (Runs) of ComponentsE.g., Runtime Configuration, Inputs + Outputs
Lineage Tracking Across All ExecutionsE.g., to recurse back to all inputs of a specific artifact
![Page 20: TensorFlow Extended (TFX) · TensorFlow Transform Estimator or Keras Model TensorFlow Model Analysis TensorFlow Serving Logging Shared Utilities for Garbage Collection, Data Access](https://reader033.fdocuments.in/reader033/viewer/2022042518/5fa6b95fe94e654b474bb264/html5/thumbnails/20.jpg)
List all training runs and attributes
![Page 21: TensorFlow Extended (TFX) · TensorFlow Transform Estimator or Keras Model TensorFlow Model Analysis TensorFlow Serving Logging Shared Utilities for Garbage Collection, Data Access](https://reader033.fdocuments.in/reader033/viewer/2022042518/5fa6b95fe94e654b474bb264/html5/thumbnails/21.jpg)
Visualize lineage of a specific model
Model artifact that was created
![Page 22: TensorFlow Extended (TFX) · TensorFlow Transform Estimator or Keras Model TensorFlow Model Analysis TensorFlow Serving Logging Shared Utilities for Garbage Collection, Data Access](https://reader033.fdocuments.in/reader033/viewer/2022042518/5fa6b95fe94e654b474bb264/html5/thumbnails/22.jpg)
Visualize data a model was trained on
![Page 23: TensorFlow Extended (TFX) · TensorFlow Transform Estimator or Keras Model TensorFlow Model Analysis TensorFlow Serving Logging Shared Utilities for Garbage Collection, Data Access](https://reader033.fdocuments.in/reader033/viewer/2022042518/5fa6b95fe94e654b474bb264/html5/thumbnails/23.jpg)
Visualize sliced eval metrics associated with a model
![Page 24: TensorFlow Extended (TFX) · TensorFlow Transform Estimator or Keras Model TensorFlow Model Analysis TensorFlow Serving Logging Shared Utilities for Garbage Collection, Data Access](https://reader033.fdocuments.in/reader033/viewer/2022042518/5fa6b95fe94e654b474bb264/html5/thumbnails/24.jpg)
Launch TensorBoard for a specific model run
![Page 25: TensorFlow Extended (TFX) · TensorFlow Transform Estimator or Keras Model TensorFlow Model Analysis TensorFlow Serving Logging Shared Utilities for Garbage Collection, Data Access](https://reader033.fdocuments.in/reader033/viewer/2022042518/5fa6b95fe94e654b474bb264/html5/thumbnails/25.jpg)
Launch TensorBoard to compare multiple model runs
![Page 26: TensorFlow Extended (TFX) · TensorFlow Transform Estimator or Keras Model TensorFlow Model Analysis TensorFlow Serving Logging Shared Utilities for Garbage Collection, Data Access](https://reader033.fdocuments.in/reader033/viewer/2022042518/5fa6b95fe94e654b474bb264/html5/thumbnails/26.jpg)
Compare data statistics for multiple models
![Page 27: TensorFlow Extended (TFX) · TensorFlow Transform Estimator or Keras Model TensorFlow Model Analysis TensorFlow Serving Logging Shared Utilities for Garbage Collection, Data Access](https://reader033.fdocuments.in/reader033/viewer/2022042518/5fa6b95fe94e654b474bb264/html5/thumbnails/27.jpg)
Examples of Metadata-Powered Functionality
Use-cases enabled by lineage tracking
![Page 28: TensorFlow Extended (TFX) · TensorFlow Transform Estimator or Keras Model TensorFlow Model Analysis TensorFlow Serving Logging Shared Utilities for Garbage Collection, Data Access](https://reader033.fdocuments.in/reader033/viewer/2022042518/5fa6b95fe94e654b474bb264/html5/thumbnails/28.jpg)
Examples of Metadata-Powered Functionality
Use-cases enabled by lineage tracking Compare previous model runs
![Page 29: TensorFlow Extended (TFX) · TensorFlow Transform Estimator or Keras Model TensorFlow Model Analysis TensorFlow Serving Logging Shared Utilities for Garbage Collection, Data Access](https://reader033.fdocuments.in/reader033/viewer/2022042518/5fa6b95fe94e654b474bb264/html5/thumbnails/29.jpg)
Examples of Metadata-Powered Functionality
Use-cases enabled by lineage tracking Compare previous model runs
Carry-over state from previous models
![Page 30: TensorFlow Extended (TFX) · TensorFlow Transform Estimator or Keras Model TensorFlow Model Analysis TensorFlow Serving Logging Shared Utilities for Garbage Collection, Data Access](https://reader033.fdocuments.in/reader033/viewer/2022042518/5fa6b95fe94e654b474bb264/html5/thumbnails/30.jpg)
Examples of Metadata-Powered Functionality
Use-cases enabled by lineage tracking Compare previous model runs
Carry-over state from previous models Re-use previously computed outputs
![Page 31: TensorFlow Extended (TFX) · TensorFlow Transform Estimator or Keras Model TensorFlow Model Analysis TensorFlow Serving Logging Shared Utilities for Garbage Collection, Data Access](https://reader033.fdocuments.in/reader033/viewer/2022042518/5fa6b95fe94e654b474bb264/html5/thumbnails/31.jpg)
How do we orchestrate TFX?
Component
Legend
![Page 32: TensorFlow Extended (TFX) · TensorFlow Transform Estimator or Keras Model TensorFlow Model Analysis TensorFlow Serving Logging Shared Utilities for Garbage Collection, Data Access](https://reader033.fdocuments.in/reader033/viewer/2022042518/5fa6b95fe94e654b474bb264/html5/thumbnails/32.jpg)
How do we orchestrate TFX?
Component
Legend
Metadata StoreDriver and Publisher
![Page 33: TensorFlow Extended (TFX) · TensorFlow Transform Estimator or Keras Model TensorFlow Model Analysis TensorFlow Serving Logging Shared Utilities for Garbage Collection, Data Access](https://reader033.fdocuments.in/reader033/viewer/2022042518/5fa6b95fe94e654b474bb264/html5/thumbnails/33.jpg)
How do we orchestrate TFX?
Component
Executor
Legend
Metadata StoreDriver and Publisher
![Page 34: TensorFlow Extended (TFX) · TensorFlow Transform Estimator or Keras Model TensorFlow Model Analysis TensorFlow Serving Logging Shared Utilities for Garbage Collection, Data Access](https://reader033.fdocuments.in/reader033/viewer/2022042518/5fa6b95fe94e654b474bb264/html5/thumbnails/34.jpg)
How do we orchestrate TFX?TFX Config
Component
Executor
Legend
Metadata StoreDriver and Publisher
![Page 35: TensorFlow Extended (TFX) · TensorFlow Transform Estimator or Keras Model TensorFlow Model Analysis TensorFlow Serving Logging Shared Utilities for Garbage Collection, Data Access](https://reader033.fdocuments.in/reader033/viewer/2022042518/5fa6b95fe94e654b474bb264/html5/thumbnails/35.jpg)
def create_pipeline(): """Implements the chicago taxi pipeline with TFX.""" examples = csv_input(os.path.join(data_root, 'simple')) example_gen = CsvExampleGen(input_base=examples)
statistics_gen = StatisticsGen(input_data=...) infer_schema = SchemaGen(stats=...) validate_stats = ExampleValidator(stats=..., schema=...) transform = Transform(input_data=..., schema=..., module_file=...)
trainer = Trainer( module_file=taxi_module_file, transformed_examples=transform.outputs.transformed_examples, transform_output=transform.outputs.transform_output, schema=infer_schema.outputs.output, train_steps=10000, eval_steps=5000, warm_starting=True)
model_analyzer = Evaluator(examples=..., model_exports=...) model_validator = ModelValidator(examples=..., model=...) pusher = Pusher(model_export=..., model_blessing=..., serving_model_dir=...) return [example_gen, statistics_gen, infer_schema, validate_stats, transform, trainer, model_analyzer, model_validator, pusher]
pipeline = TfxRunner(airflow_config).run(create_pipeline())
![Page 36: TensorFlow Extended (TFX) · TensorFlow Transform Estimator or Keras Model TensorFlow Model Analysis TensorFlow Serving Logging Shared Utilities for Garbage Collection, Data Access](https://reader033.fdocuments.in/reader033/viewer/2022042518/5fa6b95fe94e654b474bb264/html5/thumbnails/36.jpg)
def train_and_maybe_evaluate(hparams): schema = taxi.read_schema(hparams.schema_file)
train_input = lambda: model.input_fn(...) eval_input = lambda: model.input_fn(...) serving_receiver_fn = lambda: model.example_serving_receiver_fn(...)
train_spec = tf.estimator.TrainSpec(...) eval_spec = tf.estimator.EvalSpec(...)
exporter = tf.estimator.FinalExporter('chicago-taxi', serving_receiver_fn)
run_config = tf.estimator.RunConfig( save_checkpoints_steps=999, keep_checkpoint_max=1)
estimator = model.build_estimator(...)
tf.estimator.train_and_evaluate(estimator, train_spec, eval_spec)
return estimator
![Page 37: TensorFlow Extended (TFX) · TensorFlow Transform Estimator or Keras Model TensorFlow Model Analysis TensorFlow Serving Logging Shared Utilities for Garbage Collection, Data Access](https://reader033.fdocuments.in/reader033/viewer/2022042518/5fa6b95fe94e654b474bb264/html5/thumbnails/37.jpg)
def build_estimator(tf_transform_dir, config, hidden_units=None):
# receive Schema and Transform metadata metadata_dir = os.path.join(tf_transform_dir, transform_fn_io.TRANSFORMED_METADATA_DIR) transformed_metadata = metadata_io.read_metadata(metadata_dir) transformed_feature_spec = transformed_metadata.schema.as_feature_spec()
transformed_feature_spec.pop(taxi.transformed_name(taxi.LABEL_KEY))
real_valued_columns = [...] categorical_columns = [...] return tf.estimator.DNNLinearCombinedClassifier( config=config, linear_feature_columns=categorical_columns, dnn_feature_columns=real_valued_columns, dnn_hidden_units=hidden_units or [100, 70, 50, 25])
![Page 38: TensorFlow Extended (TFX) · TensorFlow Transform Estimator or Keras Model TensorFlow Model Analysis TensorFlow Serving Logging Shared Utilities for Garbage Collection, Data Access](https://reader033.fdocuments.in/reader033/viewer/2022042518/5fa6b95fe94e654b474bb264/html5/thumbnails/38.jpg)
How do we orchestrate TFX?TFX Config
Component
Executor
Legend
Metadata StoreDriver and Publisher
![Page 39: TensorFlow Extended (TFX) · TensorFlow Transform Estimator or Keras Model TensorFlow Model Analysis TensorFlow Serving Logging Shared Utilities for Garbage Collection, Data Access](https://reader033.fdocuments.in/reader033/viewer/2022042518/5fa6b95fe94e654b474bb264/html5/thumbnails/39.jpg)
Your own runtime ...Kubeflow Runtime
Bring your very own favorite orchestrator
Metadata Store
Component
Driver and Publisher
Executor
Legend
Airflow Runtime
TFX Config
![Page 40: TensorFlow Extended (TFX) · TensorFlow Transform Estimator or Keras Model TensorFlow Model Analysis TensorFlow Serving Logging Shared Utilities for Garbage Collection, Data Access](https://reader033.fdocuments.in/reader033/viewer/2022042518/5fa6b95fe94e654b474bb264/html5/thumbnails/40.jpg)
Examples of orchestrated TFX pipelines
Airflow Kubeflow Pipelines
![Page 41: TensorFlow Extended (TFX) · TensorFlow Transform Estimator or Keras Model TensorFlow Model Analysis TensorFlow Serving Logging Shared Utilities for Garbage Collection, Data Access](https://reader033.fdocuments.in/reader033/viewer/2022042518/5fa6b95fe94e654b474bb264/html5/thumbnails/41.jpg)
Kubeflow Runtime
ExampleGen
StatisticsGen SchemaGen
ExampleValidator
Transform Trainer
Evaluator
ModelValidator Pusher
TFX Config
Metadata Store
Training + Eval Data
TensorFlow Serving
TensorFlow Hub
TensorFlow Lite
TensorFlow JS
TFX: Putting it all together.
Airflow Runtime
![Page 42: TensorFlow Extended (TFX) · TensorFlow Transform Estimator or Keras Model TensorFlow Model Analysis TensorFlow Serving Logging Shared Utilities for Garbage Collection, Data Access](https://reader033.fdocuments.in/reader033/viewer/2022042518/5fa6b95fe94e654b474bb264/html5/thumbnails/42.jpg)
Get started with TensorFlow Extended (TFX)An End-to-End ML Platform
github.com/tensorflow/tfx
tensorflow.org/tfx
![Page 43: TensorFlow Extended (TFX) · TensorFlow Transform Estimator or Keras Model TensorFlow Model Analysis TensorFlow Serving Logging Shared Utilities for Garbage Collection, Data Access](https://reader033.fdocuments.in/reader033/viewer/2022042518/5fa6b95fe94e654b474bb264/html5/thumbnails/43.jpg)
TFX End-to-End ExampleChicago Taxi Cab Dataset
![Page 44: TensorFlow Extended (TFX) · TensorFlow Transform Estimator or Keras Model TensorFlow Model Analysis TensorFlow Serving Logging Shared Utilities for Garbage Collection, Data Access](https://reader033.fdocuments.in/reader033/viewer/2022042518/5fa6b95fe94e654b474bb264/html5/thumbnails/44.jpg)
TFX End-to-End Example
Categorical Features
trip_start_hour
trip_start_day
trip_start_month
pickup/dropoff_census_tract
pickup/dropoff_community_area
Dense Float Features
trip_miles
fare
trip_seconds
Bucket Features
pickup_latitude
pickup_longitude
dropoff_latitude
dropoff_longitude
Vocab Features
payment_type
company
Chicago Taxi Cab Dataset
Features
Label = tips > (fare * 20%)
![Page 45: TensorFlow Extended (TFX) · TensorFlow Transform Estimator or Keras Model TensorFlow Model Analysis TensorFlow Serving Logging Shared Utilities for Garbage Collection, Data Access](https://reader033.fdocuments.in/reader033/viewer/2022042518/5fa6b95fe94e654b474bb264/html5/thumbnails/45.jpg)
TFX End-to-End ExampleChicago Taxi Cab Dataset
string_to_int bucketize scale_to_z_score
Features
Transforms
Label = tips > (fare * 20%)
Categorical Features
trip_start_hour
trip_start_day
trip_start_month
pickup/dropoff_census_tract
pickup/dropoff_community_area
Dense Float Features
trip_miles
fare
trip_seconds
Bucket Features
pickup_latitude
pickup_longitude
dropoff_latitude
dropoff_longitude
Vocab Features
payment_type
company
![Page 46: TensorFlow Extended (TFX) · TensorFlow Transform Estimator or Keras Model TensorFlow Model Analysis TensorFlow Serving Logging Shared Utilities for Garbage Collection, Data Access](https://reader033.fdocuments.in/reader033/viewer/2022042518/5fa6b95fe94e654b474bb264/html5/thumbnails/46.jpg)
TFX End-to-End ExampleChicago Taxi Cab Dataset
string_to_int bucketize scale_to_z_score
Features
Transforms
Model (Wide+Deep)
Label = tips > (fare * 20%)
Categorical Features
trip_start_hour
trip_start_day
trip_start_month
pickup/dropoff_census_tract
pickup/dropoff_community_area
Dense Float Features
trip_miles
fare
trip_seconds
Bucket Features
pickup_latitude
pickup_longitude
dropoff_latitude
dropoff_longitude
Vocab Features
payment_type
company
![Page 47: TensorFlow Extended (TFX) · TensorFlow Transform Estimator or Keras Model TensorFlow Model Analysis TensorFlow Serving Logging Shared Utilities for Garbage Collection, Data Access](https://reader033.fdocuments.in/reader033/viewer/2022042518/5fa6b95fe94e654b474bb264/html5/thumbnails/47.jpg)
TFX End-to-End ExampleChicago Taxi Cab Dataset
string_to_int bucketize scale_to_z_score
Features
Transforms
Model(Wide+Deep)
Label = tips > (fare * 20%)
Categorical Features
trip_start_hour
trip_start_day
trip_start_month
pickup/dropoff_census_tract
pickup/dropoff_community_area
Dense Float Features
trip_miles
fare
trip_seconds
Bucket Features
pickup_latitude
pickup_longitude
dropoff_latitude
dropoff_longitude
Vocab Features
payment_type
company
![Page 48: TensorFlow Extended (TFX) · TensorFlow Transform Estimator or Keras Model TensorFlow Model Analysis TensorFlow Serving Logging Shared Utilities for Garbage Collection, Data Access](https://reader033.fdocuments.in/reader033/viewer/2022042518/5fa6b95fe94e654b474bb264/html5/thumbnails/48.jpg)
Data Validation and Transformation
Clemens Mewald
![Page 49: TensorFlow Extended (TFX) · TensorFlow Transform Estimator or Keras Model TensorFlow Model Analysis TensorFlow Serving Logging Shared Utilities for Garbage Collection, Data Access](https://reader033.fdocuments.in/reader033/viewer/2022042518/5fa6b95fe94e654b474bb264/html5/thumbnails/49.jpg)
Kubeflow Runtime
ExampleGen
StatisticsGen SchemaGen
ExampleValidator
Transform Trainer
Evaluator
ModelValidator Pusher
TFX Config
Metadata Store
Training + Eval Data
TensorFlow Serving
TensorFlow Hub
TensorFlow Lite
TensorFlow JS
Overview
Airflow Runtime
Data Ingestion Data Transformation
Data Analysis & Validation
![Page 50: TensorFlow Extended (TFX) · TensorFlow Transform Estimator or Keras Model TensorFlow Model Analysis TensorFlow Serving Logging Shared Utilities for Garbage Collection, Data Access](https://reader033.fdocuments.in/reader033/viewer/2022042518/5fa6b95fe94e654b474bb264/html5/thumbnails/50.jpg)
Kubeflow Runtime
ExampleGen
StatisticsGen SchemaGen
ExampleValidator
Transform Trainer
Evaluator
ModelValidator Pusher
TFX Config
Metadata Store
Training + Eval Data
TensorFlow Serving
TensorFlow Hub
TensorFlow Lite
TensorFlow JS
ExampleGen
Airflow Runtime
![Page 51: TensorFlow Extended (TFX) · TensorFlow Transform Estimator or Keras Model TensorFlow Model Analysis TensorFlow Serving Logging Shared Utilities for Garbage Collection, Data Access](https://reader033.fdocuments.in/reader033/viewer/2022042518/5fa6b95fe94e654b474bb264/html5/thumbnails/51.jpg)
Component: ExampleGen
ExampleGen
Raw Data
Inputs and Outputs
CSV TF Record
Split TF Record
Data
Training
Eval
![Page 52: TensorFlow Extended (TFX) · TensorFlow Transform Estimator or Keras Model TensorFlow Model Analysis TensorFlow Serving Logging Shared Utilities for Garbage Collection, Data Access](https://reader033.fdocuments.in/reader033/viewer/2022042518/5fa6b95fe94e654b474bb264/html5/thumbnails/52.jpg)
Component: ExampleGen
examples = csv_input(os.path.join(data_root, 'simple'))
example_gen = CsvExampleGen(input_base=examples)
Configuration
ExampleGen
Raw Data
Inputs and Outputs
CSV TF Record
Split TF Record
Data
Training
Eval
![Page 53: TensorFlow Extended (TFX) · TensorFlow Transform Estimator or Keras Model TensorFlow Model Analysis TensorFlow Serving Logging Shared Utilities for Garbage Collection, Data Access](https://reader033.fdocuments.in/reader033/viewer/2022042518/5fa6b95fe94e654b474bb264/html5/thumbnails/53.jpg)
Kubeflow Runtime
ExampleGen
StatisticsGen SchemaGen
ExampleValidator
Transform Trainer
Evaluator
ModelValidator Pusher
TFX Config
Metadata Store
Training + Eval Data
TensorFlow Serving
TensorFlow Hub
TensorFlow Lite
TensorFlow JS
Data Analysis & Validation
Airflow Runtime
Data Analysis & Validation
![Page 54: TensorFlow Extended (TFX) · TensorFlow Transform Estimator or Keras Model TensorFlow Model Analysis TensorFlow Serving Logging Shared Utilities for Garbage Collection, Data Access](https://reader033.fdocuments.in/reader033/viewer/2022042518/5fa6b95fe94e654b474bb264/html5/thumbnails/54.jpg)
Why Data Validation is important
ML
![Page 55: TensorFlow Extended (TFX) · TensorFlow Transform Estimator or Keras Model TensorFlow Model Analysis TensorFlow Serving Logging Shared Utilities for Garbage Collection, Data Access](https://reader033.fdocuments.in/reader033/viewer/2022042518/5fa6b95fe94e654b474bb264/html5/thumbnails/55.jpg)
Why Data Validation is important
garbage in garbage out
ML
![Page 56: TensorFlow Extended (TFX) · TensorFlow Transform Estimator or Keras Model TensorFlow Model Analysis TensorFlow Serving Logging Shared Utilities for Garbage Collection, Data Access](https://reader033.fdocuments.in/reader033/viewer/2022042518/5fa6b95fe94e654b474bb264/html5/thumbnails/56.jpg)
Why Data Validation is important
Data understanding is important for model understanding
“Why are my tip predictions bad in the morning hours?”
![Page 57: TensorFlow Extended (TFX) · TensorFlow Transform Estimator or Keras Model TensorFlow Model Analysis TensorFlow Serving Logging Shared Utilities for Garbage Collection, Data Access](https://reader033.fdocuments.in/reader033/viewer/2022042518/5fa6b95fe94e654b474bb264/html5/thumbnails/57.jpg)
Why Data Validation is important
Data understanding is important for model understanding
“What are expected values for payment types?”
Treat data as you treat code
![Page 58: TensorFlow Extended (TFX) · TensorFlow Transform Estimator or Keras Model TensorFlow Model Analysis TensorFlow Serving Logging Shared Utilities for Garbage Collection, Data Access](https://reader033.fdocuments.in/reader033/viewer/2022042518/5fa6b95fe94e654b474bb264/html5/thumbnails/58.jpg)
Why Data Validation is important
Data understanding is important for model understanding
“Is this new taxi company name a typo or a new company?”
Treat data as you treat code
Catching errors early is critical
![Page 59: TensorFlow Extended (TFX) · TensorFlow Transform Estimator or Keras Model TensorFlow Model Analysis TensorFlow Serving Logging Shared Utilities for Garbage Collection, Data Access](https://reader033.fdocuments.in/reader033/viewer/2022042518/5fa6b95fe94e654b474bb264/html5/thumbnails/59.jpg)
Kubeflow Runtime
ExampleGen
StatisticsGen SchemaGen
ExampleValidator
Transform Trainer
Evaluator
ModelValidator Pusher
TFX Config
Metadata Store
Training + Eval Data
TensorFlow Serving
TensorFlow Hub
TensorFlow Lite
TensorFlow JS
StatisticsGen
Airflow Runtime
![Page 60: TensorFlow Extended (TFX) · TensorFlow Transform Estimator or Keras Model TensorFlow Model Analysis TensorFlow Serving Logging Shared Utilities for Garbage Collection, Data Access](https://reader033.fdocuments.in/reader033/viewer/2022042518/5fa6b95fe94e654b474bb264/html5/thumbnails/60.jpg)
Component: StatisticsGen
StatisticsGen
Data
ExampleGen
Inputs and Outputs
Statistics
● Training● Eval● Serving logs (for skew detection)
![Page 61: TensorFlow Extended (TFX) · TensorFlow Transform Estimator or Keras Model TensorFlow Model Analysis TensorFlow Serving Logging Shared Utilities for Garbage Collection, Data Access](https://reader033.fdocuments.in/reader033/viewer/2022042518/5fa6b95fe94e654b474bb264/html5/thumbnails/61.jpg)
Component: StatisticsGen
StatisticsGen
Data
ExampleGen
Inputs and Outputs
Statistics
● Captures shape of data● Visualization highlights unusual stats● Overlay helps with comparison
![Page 62: TensorFlow Extended (TFX) · TensorFlow Transform Estimator or Keras Model TensorFlow Model Analysis TensorFlow Serving Logging Shared Utilities for Garbage Collection, Data Access](https://reader033.fdocuments.in/reader033/viewer/2022042518/5fa6b95fe94e654b474bb264/html5/thumbnails/62.jpg)
Component: StatisticsGen
statistics_gen = StatisticsGen(input_data=example_gen.outputs.examples)
Configuration
Visualization
StatisticsGen
Data
ExampleGen
Inputs and Outputs
Statistics
![Page 63: TensorFlow Extended (TFX) · TensorFlow Transform Estimator or Keras Model TensorFlow Model Analysis TensorFlow Serving Logging Shared Utilities for Garbage Collection, Data Access](https://reader033.fdocuments.in/reader033/viewer/2022042518/5fa6b95fe94e654b474bb264/html5/thumbnails/63.jpg)
Why are my tip predictions bad in the morning hours?
![Page 64: TensorFlow Extended (TFX) · TensorFlow Transform Estimator or Keras Model TensorFlow Model Analysis TensorFlow Serving Logging Shared Utilities for Garbage Collection, Data Access](https://reader033.fdocuments.in/reader033/viewer/2022042518/5fa6b95fe94e654b474bb264/html5/thumbnails/64.jpg)
Kubeflow Runtime
ExampleGen
StatisticsGen SchemaGen
ExampleValidator
Transform Trainer
Evaluator
ModelValidator Pusher
TFX Config
Metadata Store
Training + Eval Data
TensorFlow Serving
TensorFlow Hub
TensorFlow Lite
TensorFlow JS
SchemaGen
Airflow Runtime
![Page 65: TensorFlow Extended (TFX) · TensorFlow Transform Estimator or Keras Model TensorFlow Model Analysis TensorFlow Serving Logging Shared Utilities for Garbage Collection, Data Access](https://reader033.fdocuments.in/reader033/viewer/2022042518/5fa6b95fe94e654b474bb264/html5/thumbnails/65.jpg)
Component: SchemaGen
SchemaGen
Statistics
StatisticsGen
Inputs and Outputs
Schema
● High-level description of the data○ Expected features○ Expected value domains○ Expected constraints○ and much more!
● Codifies expectations of “good” data● Initially inferred, then user-curated
![Page 66: TensorFlow Extended (TFX) · TensorFlow Transform Estimator or Keras Model TensorFlow Model Analysis TensorFlow Serving Logging Shared Utilities for Garbage Collection, Data Access](https://reader033.fdocuments.in/reader033/viewer/2022042518/5fa6b95fe94e654b474bb264/html5/thumbnails/66.jpg)
Component: SchemaGen
SchemaGen
Statistics
StatisticsGen
Inputs and Outputs
Schema
infer_schema = SchemaGen(stats=statistics_gen.outputs.output)
Configuration
Visualization
![Page 67: TensorFlow Extended (TFX) · TensorFlow Transform Estimator or Keras Model TensorFlow Model Analysis TensorFlow Serving Logging Shared Utilities for Garbage Collection, Data Access](https://reader033.fdocuments.in/reader033/viewer/2022042518/5fa6b95fe94e654b474bb264/html5/thumbnails/67.jpg)
What are expected values for payment types?
![Page 68: TensorFlow Extended (TFX) · TensorFlow Transform Estimator or Keras Model TensorFlow Model Analysis TensorFlow Serving Logging Shared Utilities for Garbage Collection, Data Access](https://reader033.fdocuments.in/reader033/viewer/2022042518/5fa6b95fe94e654b474bb264/html5/thumbnails/68.jpg)
Kubeflow Runtime
ExampleGen
StatisticsGen SchemaGen
ExampleValidator
Transform Trainer
Evaluator
ModelValidator Pusher
TFX Config
Metadata Store
Training + Eval Data
TensorFlow Serving
TensorFlow Hub
TensorFlow Lite
TensorFlow JS
ExampleValidator
Airflow Runtime
![Page 69: TensorFlow Extended (TFX) · TensorFlow Transform Estimator or Keras Model TensorFlow Model Analysis TensorFlow Serving Logging Shared Utilities for Garbage Collection, Data Access](https://reader033.fdocuments.in/reader033/viewer/2022042518/5fa6b95fe94e654b474bb264/html5/thumbnails/69.jpg)
Component: ExampleValidator
ExampleValidator
Statistics Schema
StatisticsGen SchemaGen
Inputs and Outputs
Anomalies Report
● Missing features● Wrong feature valency● Training/serving skew● Data distribution drift● ...
![Page 70: TensorFlow Extended (TFX) · TensorFlow Transform Estimator or Keras Model TensorFlow Model Analysis TensorFlow Serving Logging Shared Utilities for Garbage Collection, Data Access](https://reader033.fdocuments.in/reader033/viewer/2022042518/5fa6b95fe94e654b474bb264/html5/thumbnails/70.jpg)
Component: ExampleValidator
ExampleValidator
Statistics Schema
StatisticsGen SchemaGen
Inputs and Outputs
Anomalies Report
validate_stats = ExampleValidator( stats=statistics_gen.outputs.output, schema=infer_schema.outputs.output)
Configuration
Visualization
![Page 71: TensorFlow Extended (TFX) · TensorFlow Transform Estimator or Keras Model TensorFlow Model Analysis TensorFlow Serving Logging Shared Utilities for Garbage Collection, Data Access](https://reader033.fdocuments.in/reader033/viewer/2022042518/5fa6b95fe94e654b474bb264/html5/thumbnails/71.jpg)
Is this new taxi company name a typo or a new company?
![Page 72: TensorFlow Extended (TFX) · TensorFlow Transform Estimator or Keras Model TensorFlow Model Analysis TensorFlow Serving Logging Shared Utilities for Garbage Collection, Data Access](https://reader033.fdocuments.in/reader033/viewer/2022042518/5fa6b95fe94e654b474bb264/html5/thumbnails/72.jpg)
Kubeflow Runtime
ExampleGen
StatisticsGen SchemaGen
ExampleValidator
Transform Trainer
Evaluator
ModelValidator Pusher
TFX Config
Metadata Store
Training + Eval Data
TensorFlow Serving
TensorFlow Hub
TensorFlow Lite
TensorFlow JS
Transform
Airflow Runtime
![Page 73: TensorFlow Extended (TFX) · TensorFlow Transform Estimator or Keras Model TensorFlow Model Analysis TensorFlow Serving Logging Shared Utilities for Garbage Collection, Data Access](https://reader033.fdocuments.in/reader033/viewer/2022042518/5fa6b95fe94e654b474bb264/html5/thumbnails/73.jpg)
Recap: End-to-End ExampleChicago Taxi Cab Dataset
string_to_int bucketize scale_to_z_score
Features
Transforms
Model(Wide+Deep)
Label = tips > (fare * 20%)
Categorical Features
trip_start_hour
trip_start_day
trip_start_month
pickup/dropoff_census_tract
pickup/dropoff_community_area
Dense Float Features
trip_miles
fare
trip_seconds
Bucket Features
pickup_latitude
pickup_longitude
dropoff_latitude
dropoff_longitude
Vocab Features
payment_type
company
![Page 74: TensorFlow Extended (TFX) · TensorFlow Transform Estimator or Keras Model TensorFlow Model Analysis TensorFlow Serving Logging Shared Utilities for Garbage Collection, Data Access](https://reader033.fdocuments.in/reader033/viewer/2022042518/5fa6b95fe94e654b474bb264/html5/thumbnails/74.jpg)
Using tf.Transform for feature transformations.
![Page 75: TensorFlow Extended (TFX) · TensorFlow Transform Estimator or Keras Model TensorFlow Model Analysis TensorFlow Serving Logging Shared Utilities for Garbage Collection, Data Access](https://reader033.fdocuments.in/reader033/viewer/2022042518/5fa6b95fe94e654b474bb264/html5/thumbnails/75.jpg)
Using tf.Transform for feature transformations.
![Page 76: TensorFlow Extended (TFX) · TensorFlow Transform Estimator or Keras Model TensorFlow Model Analysis TensorFlow Serving Logging Shared Utilities for Garbage Collection, Data Access](https://reader033.fdocuments.in/reader033/viewer/2022042518/5fa6b95fe94e654b474bb264/html5/thumbnails/76.jpg)
Using tf.Transform for feature transformations.
Training Serving
![Page 77: TensorFlow Extended (TFX) · TensorFlow Transform Estimator or Keras Model TensorFlow Model Analysis TensorFlow Serving Logging Shared Utilities for Garbage Collection, Data Access](https://reader033.fdocuments.in/reader033/viewer/2022042518/5fa6b95fe94e654b474bb264/html5/thumbnails/77.jpg)
Component: Transform
Transform
Data Schema
Transform Graph
Transformed Data
ExampleGen SchemaGen
Trainer
Inputs and Outputs
● User-provided transform code (TF Transform)● Schema for parsing
Code
![Page 78: TensorFlow Extended (TFX) · TensorFlow Transform Estimator or Keras Model TensorFlow Model Analysis TensorFlow Serving Logging Shared Utilities for Garbage Collection, Data Access](https://reader033.fdocuments.in/reader033/viewer/2022042518/5fa6b95fe94e654b474bb264/html5/thumbnails/78.jpg)
Component: Transform
Transform
Data Schema
Transform Graph
Transformed Data
ExampleGen SchemaGen
Trainer
Inputs and Outputs
Transform Graph● Applied at training time● Embedded in serving graph
(Optional) Transformed Data● For performance optimization
Code
![Page 79: TensorFlow Extended (TFX) · TensorFlow Transform Estimator or Keras Model TensorFlow Model Analysis TensorFlow Serving Logging Shared Utilities for Garbage Collection, Data Access](https://reader033.fdocuments.in/reader033/viewer/2022042518/5fa6b95fe94e654b474bb264/html5/thumbnails/79.jpg)
Component: Transform
transform = Transform( input_data=example_gen.outputs.examples, schema=infer_schema.outputs.output, module_file=taxi_module_file)
Configuration
for key in _DENSE_FLOAT_FEATURE_KEYS: outputs[_transformed_name(key)] = transform.scale_to_z_score( _fill_in_missing(inputs[key]))# ...
outputs[_transformed_name(_LABEL_KEY)] = tf.where( tf.is_nan(taxi_fare), tf.cast(tf.zeros_like(taxi_fare), tf.int64), # Test if the tip was > 20% of the fare. tf.cast( tf.greater(tips, tf.multiply(taxi_fare, tf.constant(0.2))), tf.int64))
# ...
CodeTransform
Data Schema
Transform Graph
Transformed Data
ExampleGen SchemaGen
Trainer
Inputs and Outputs
Code
![Page 80: TensorFlow Extended (TFX) · TensorFlow Transform Estimator or Keras Model TensorFlow Model Analysis TensorFlow Serving Logging Shared Utilities for Garbage Collection, Data Access](https://reader033.fdocuments.in/reader033/viewer/2022042518/5fa6b95fe94e654b474bb264/html5/thumbnails/80.jpg)
def preprocessing_fn(inputs): ... for key in taxi.DENSE_FLOAT_FEATURE_KEYS: outputs[key] = transform.scale_to_z_score(inputs[key])
for key in taxi.VOCAB_FEATURE_KEYS: outputs[key] = transform.string_to_int(inputs[key], top_k=taxi.VOCAB_SIZE, num_oov_buckets=taxi.OOV_SIZE)
for key in taxi.BUCKET_FEATURE_KEYS: outputs[key] = transform.bucketize(inputs[key], taxi.FEATURE_BUCKET_COUNT) ...
![Page 81: TensorFlow Extended (TFX) · TensorFlow Transform Estimator or Keras Model TensorFlow Model Analysis TensorFlow Serving Logging Shared Utilities for Garbage Collection, Data Access](https://reader033.fdocuments.in/reader033/viewer/2022042518/5fa6b95fe94e654b474bb264/html5/thumbnails/81.jpg)
Kubeflow Runtime
ExampleGen
StatisticsGen SchemaGen
ExampleValidator
Transform Trainer
Evaluator
ModelValidator Pusher
TFX Config
Metadata Store
Training + Eval Data
TensorFlow Serving
TensorFlow Hub
TensorFlow Lite
TensorFlow JS
Overview
Airflow Runtime
Data Ingestion Data Transformation
Data Analysis & Validation
![Page 82: TensorFlow Extended (TFX) · TensorFlow Transform Estimator or Keras Model TensorFlow Model Analysis TensorFlow Serving Logging Shared Utilities for Garbage Collection, Data Access](https://reader033.fdocuments.in/reader033/viewer/2022042518/5fa6b95fe94e654b474bb264/html5/thumbnails/82.jpg)
Training
Clemens Mewald
![Page 83: TensorFlow Extended (TFX) · TensorFlow Transform Estimator or Keras Model TensorFlow Model Analysis TensorFlow Serving Logging Shared Utilities for Garbage Collection, Data Access](https://reader033.fdocuments.in/reader033/viewer/2022042518/5fa6b95fe94e654b474bb264/html5/thumbnails/83.jpg)
Kubeflow Runtime
ExampleGen
StatisticsGen SchemaGen
ExampleValidator
Transform Trainer
Evaluator
ModelValidator Pusher
TFX Config
Metadata Store
Training + Eval Data
TensorFlow Serving
TensorFlow Hub
TensorFlow Lite
TensorFlow JS
Trainer
Airflow Runtime
![Page 84: TensorFlow Extended (TFX) · TensorFlow Transform Estimator or Keras Model TensorFlow Model Analysis TensorFlow Serving Logging Shared Utilities for Garbage Collection, Data Access](https://reader033.fdocuments.in/reader033/viewer/2022042518/5fa6b95fe94e654b474bb264/html5/thumbnails/84.jpg)
Component: Trainer
Trainer
Data Schema
Transform SchemaGen
Evaluator
Inputs and Outputs
Code
Transform Graph
Model Validator Pusher
Model(s)
● User-provided training code (TensorFlow)● Optionally, transformed data
![Page 85: TensorFlow Extended (TFX) · TensorFlow Transform Estimator or Keras Model TensorFlow Model Analysis TensorFlow Serving Logging Shared Utilities for Garbage Collection, Data Access](https://reader033.fdocuments.in/reader033/viewer/2022042518/5fa6b95fe94e654b474bb264/html5/thumbnails/85.jpg)
Component: Trainer
Trainer
Data Schema
Transform SchemaGen
Evaluator
Inputs and Outputs
Code
Transform Graph
Model Validator Pusher
Highlight: SavedModel Format
TensorFlow Serving
TensorFlow Model Analysis
Train, Eval, and Inference Graphs
SignatureDefEval Metadata
SignatureDefModel(s)
![Page 86: TensorFlow Extended (TFX) · TensorFlow Transform Estimator or Keras Model TensorFlow Model Analysis TensorFlow Serving Logging Shared Utilities for Garbage Collection, Data Access](https://reader033.fdocuments.in/reader033/viewer/2022042518/5fa6b95fe94e654b474bb264/html5/thumbnails/86.jpg)
Component: Trainer
trainer = Trainer( module_file=taxi_module_file, transformed_examples=transform.outputs.transformed_examples, schema=infer_schema.outputs.output, transform_output=transform.outputs.transform_output, train_steps=10000, eval_steps=5000, warm_starting=True)
Configuration
Code: Just TensorFlow :)
Trainer
Data Schema
Transform SchemaGen
Evaluator
Inputs and Outputs
Code
Transform Graph
Model Validator Pusher
Model(s)
![Page 87: TensorFlow Extended (TFX) · TensorFlow Transform Estimator or Keras Model TensorFlow Model Analysis TensorFlow Serving Logging Shared Utilities for Garbage Collection, Data Access](https://reader033.fdocuments.in/reader033/viewer/2022042518/5fa6b95fe94e654b474bb264/html5/thumbnails/87.jpg)
def train_and_maybe_evaluate(hparams): schema = taxi.read_schema(hparams.schema_file)
train_input = lambda: model.input_fn(...) eval_input = lambda: model.input_fn(...) serving_receiver_fn = lambda: model.example_serving_receiver_fn(...)
train_spec = tf.estimator.TrainSpec(...) eval_spec = tf.estimator.EvalSpec(...)
exporter = tf.estimator.FinalExporter('chicago-taxi', serving_receiver_fn)
run_config = tf.estimator.RunConfig( save_checkpoints_steps=999, keep_checkpoint_max=1)
estimator = model.build_estimator(...)
tf.estimator.train_and_evaluate(estimator, train_spec, eval_spec)
return estimator
![Page 88: TensorFlow Extended (TFX) · TensorFlow Transform Estimator or Keras Model TensorFlow Model Analysis TensorFlow Serving Logging Shared Utilities for Garbage Collection, Data Access](https://reader033.fdocuments.in/reader033/viewer/2022042518/5fa6b95fe94e654b474bb264/html5/thumbnails/88.jpg)
def build_estimator(tf_transform_dir, config, hidden_units=None):
# receive Schema and Transform metadata metadata_dir = os.path.join(tf_transform_dir, transform_fn_io.TRANSFORMED_METADATA_DIR) transformed_metadata = metadata_io.read_metadata(metadata_dir) transformed_feature_spec = transformed_metadata.schema.as_feature_spec()
transformed_feature_spec.pop(taxi.transformed_name(taxi.LABEL_KEY))
real_valued_columns = [...] categorical_columns = [...] return tf.estimator.DNNLinearCombinedClassifier( config=config, linear_feature_columns=categorical_columns, dnn_feature_columns=real_valued_columns, dnn_hidden_units=hidden_units or [100, 70, 50, 25])
![Page 89: TensorFlow Extended (TFX) · TensorFlow Transform Estimator or Keras Model TensorFlow Model Analysis TensorFlow Serving Logging Shared Utilities for Garbage Collection, Data Access](https://reader033.fdocuments.in/reader033/viewer/2022042518/5fa6b95fe94e654b474bb264/html5/thumbnails/89.jpg)
model = tf.keras.models.Sequential([ tf.keras.layers.Flatten(), tf.keras.layers.Dense(512, activation='relu'), tf.keras.layers.Dropout(0.2), tf.keras.layers.Dense(10, activation='softmax')])model.compile(optimizer='adam', loss='sparse_categorical_crossentropy', metrics=['accuracy'])
model.fit(x_train, y_train, epochs=5)model.evaluate(x_test, y_test)
Keras: TF 2.0
![Page 90: TensorFlow Extended (TFX) · TensorFlow Transform Estimator or Keras Model TensorFlow Model Analysis TensorFlow Serving Logging Shared Utilities for Garbage Collection, Data Access](https://reader033.fdocuments.in/reader033/viewer/2022042518/5fa6b95fe94e654b474bb264/html5/thumbnails/90.jpg)
model = tf.keras.models.Sequential([
tf.keras.layers.Dense(64, input_shape=[10]),
tf.keras.layers.Dense(64, activation='relu'),
tf.keras.layers.Dense(10, activation='softmax')])
model.compile(optimizer='adam',
loss='categorical_crossentropy',
metrics=['accuracy'])
Going big: tf.distribute.Strategy
![Page 91: TensorFlow Extended (TFX) · TensorFlow Transform Estimator or Keras Model TensorFlow Model Analysis TensorFlow Serving Logging Shared Utilities for Garbage Collection, Data Access](https://reader033.fdocuments.in/reader033/viewer/2022042518/5fa6b95fe94e654b474bb264/html5/thumbnails/91.jpg)
strategy = tf.distribute.MirroredStrategy()
with strategy.scope():
model = tf.keras.models.Sequential([
tf.keras.layers.Dense(64, input_shape=[10]),
tf.keras.layers.Dense(64, activation='relu'),
tf.keras.layers.Dense(10, activation='softmax')])
model.compile(optimizer='adam',
loss='categorical_crossentropy',
metrics=['accuracy'])
Going big: Multi-GPU
![Page 92: TensorFlow Extended (TFX) · TensorFlow Transform Estimator or Keras Model TensorFlow Model Analysis TensorFlow Serving Logging Shared Utilities for Garbage Collection, Data Access](https://reader033.fdocuments.in/reader033/viewer/2022042518/5fa6b95fe94e654b474bb264/html5/thumbnails/92.jpg)
strategy = tf.distribute.experimental.MultiWorkerMirroredStrategy()
with strategy.scope():
model = tf.keras.models.Sequential([
tf.keras.layers.Dense(64, input_shape=[10]),
tf.keras.layers.Dense(64, activation='relu'),
tf.keras.layers.Dense(10, activation='softmax')])
model.compile(optimizer='adam',
loss='categorical_crossentropy',
metrics=['accuracy'])
Coming soon: Multi-node synchronous
![Page 93: TensorFlow Extended (TFX) · TensorFlow Transform Estimator or Keras Model TensorFlow Model Analysis TensorFlow Serving Logging Shared Utilities for Garbage Collection, Data Access](https://reader033.fdocuments.in/reader033/viewer/2022042518/5fa6b95fe94e654b474bb264/html5/thumbnails/93.jpg)
saved_model_path = tf.keras.experimental.export_saved_model(
model, '/path/to/model')
new_model = tf.keras.experimental.load_from_saved_model(
saved_model_path)
new_model.summary()
To SavedModel and beyond
![Page 94: TensorFlow Extended (TFX) · TensorFlow Transform Estimator or Keras Model TensorFlow Model Analysis TensorFlow Serving Logging Shared Utilities for Garbage Collection, Data Access](https://reader033.fdocuments.in/reader033/viewer/2022042518/5fa6b95fe94e654b474bb264/html5/thumbnails/94.jpg)
Model Evaluation and Analysis
Clemens Mewald
![Page 95: TensorFlow Extended (TFX) · TensorFlow Transform Estimator or Keras Model TensorFlow Model Analysis TensorFlow Serving Logging Shared Utilities for Garbage Collection, Data Access](https://reader033.fdocuments.in/reader033/viewer/2022042518/5fa6b95fe94e654b474bb264/html5/thumbnails/95.jpg)
Kubeflow Runtime
ExampleGen
StatisticsGen SchemaGen
ExampleValidator
Transform Trainer
Evaluator
ModelValidator Pusher
TFX Config
Metadata Store
Training + Eval Data
TensorFlow Serving
TensorFlow Hub
TensorFlow Lite
TensorFlow JS
Model Analysis & Validation
Airflow Runtime
![Page 96: TensorFlow Extended (TFX) · TensorFlow Transform Estimator or Keras Model TensorFlow Model Analysis TensorFlow Serving Logging Shared Utilities for Garbage Collection, Data Access](https://reader033.fdocuments.in/reader033/viewer/2022042518/5fa6b95fe94e654b474bb264/html5/thumbnails/96.jpg)
Kubeflow Runtime
ExampleGen
StatisticsGen SchemaGen
ExampleValidator
Transform Trainer
Evaluator
ModelValidator Pusher
TFX Config
Metadata Store
Training + Eval Data
TensorFlow Serving
TensorFlow Hub
TensorFlow Lite
TensorFlow JS
Evaluator
Airflow Runtime
![Page 97: TensorFlow Extended (TFX) · TensorFlow Transform Estimator or Keras Model TensorFlow Model Analysis TensorFlow Serving Logging Shared Utilities for Garbage Collection, Data Access](https://reader033.fdocuments.in/reader033/viewer/2022042518/5fa6b95fe94e654b474bb264/html5/thumbnails/97.jpg)
Why Model Evaluation is important
Assess overall model quality overall
“How well can I predict trips that result in tips > 20%?”
![Page 98: TensorFlow Extended (TFX) · TensorFlow Transform Estimator or Keras Model TensorFlow Model Analysis TensorFlow Serving Logging Shared Utilities for Garbage Collection, Data Access](https://reader033.fdocuments.in/reader033/viewer/2022042518/5fa6b95fe94e654b474bb264/html5/thumbnails/98.jpg)
Why Model Evaluation is important
Assess overall model quality overall
“Why are my tip predictions sometimes wrong?”
Assess model quality on specific segments / slices
![Page 99: TensorFlow Extended (TFX) · TensorFlow Transform Estimator or Keras Model TensorFlow Model Analysis TensorFlow Serving Logging Shared Utilities for Garbage Collection, Data Access](https://reader033.fdocuments.in/reader033/viewer/2022042518/5fa6b95fe94e654b474bb264/html5/thumbnails/99.jpg)
Why Model Evaluation is important
Assess overall model quality overall
“Am I getting better at predicting trips with tips > 20%?”
Assess model quality on specific segments / slices
Track performance over time
![Page 100: TensorFlow Extended (TFX) · TensorFlow Transform Estimator or Keras Model TensorFlow Model Analysis TensorFlow Serving Logging Shared Utilities for Garbage Collection, Data Access](https://reader033.fdocuments.in/reader033/viewer/2022042518/5fa6b95fe94e654b474bb264/html5/thumbnails/100.jpg)
Component: Evaluator
Evaluator
Data Model
ExampleGen Trainer
Inputs and Outputs
Evaluation Metrics
● Evaluation split of data● Eval spec for slicing of metrics
![Page 101: TensorFlow Extended (TFX) · TensorFlow Transform Estimator or Keras Model TensorFlow Model Analysis TensorFlow Serving Logging Shared Utilities for Garbage Collection, Data Access](https://reader033.fdocuments.in/reader033/viewer/2022042518/5fa6b95fe94e654b474bb264/html5/thumbnails/101.jpg)
Component: Evaluator
Evaluator
Data Model
ExampleGen Trainer
Inputs and Outputs
Evaluation Metrics
model_analyzer = Evaluator( examples=examples_gen.outputs.output, eval_spec=taxi_eval_spec, model_exports=trainer.outputs.output)
Configuration
Visualization
![Page 102: TensorFlow Extended (TFX) · TensorFlow Transform Estimator or Keras Model TensorFlow Model Analysis TensorFlow Serving Logging Shared Utilities for Garbage Collection, Data Access](https://reader033.fdocuments.in/reader033/viewer/2022042518/5fa6b95fe94e654b474bb264/html5/thumbnails/102.jpg)
How well can I predict trips that result in tips > 20%?
![Page 103: TensorFlow Extended (TFX) · TensorFlow Transform Estimator or Keras Model TensorFlow Model Analysis TensorFlow Serving Logging Shared Utilities for Garbage Collection, Data Access](https://reader033.fdocuments.in/reader033/viewer/2022042518/5fa6b95fe94e654b474bb264/html5/thumbnails/103.jpg)
Why are my tip predictions sometimes wrong?
![Page 104: TensorFlow Extended (TFX) · TensorFlow Transform Estimator or Keras Model TensorFlow Model Analysis TensorFlow Serving Logging Shared Utilities for Garbage Collection, Data Access](https://reader033.fdocuments.in/reader033/viewer/2022042518/5fa6b95fe94e654b474bb264/html5/thumbnails/104.jpg)
Am I getting better at predicting trips with tips > 20%?
![Page 105: TensorFlow Extended (TFX) · TensorFlow Transform Estimator or Keras Model TensorFlow Model Analysis TensorFlow Serving Logging Shared Utilities for Garbage Collection, Data Access](https://reader033.fdocuments.in/reader033/viewer/2022042518/5fa6b95fe94e654b474bb264/html5/thumbnails/105.jpg)
Kubeflow Runtime
ExampleGen
StatisticsGen SchemaGen
ExampleValidator
Transform Trainer
Evaluator
ModelValidator Pusher
TFX Config
Metadata Store
Training + Eval Data
TensorFlow Serving
TensorFlow Hub
TensorFlow Lite
TensorFlow JS
ModelValidator
Airflow Runtime
![Page 106: TensorFlow Extended (TFX) · TensorFlow Transform Estimator or Keras Model TensorFlow Model Analysis TensorFlow Serving Logging Shared Utilities for Garbage Collection, Data Access](https://reader033.fdocuments.in/reader033/viewer/2022042518/5fa6b95fe94e654b474bb264/html5/thumbnails/106.jpg)
Why Model Validation is important
Avoid pushing models with degraded quality
“Why am I suddenly getting tipped less?”
![Page 107: TensorFlow Extended (TFX) · TensorFlow Transform Estimator or Keras Model TensorFlow Model Analysis TensorFlow Serving Logging Shared Utilities for Garbage Collection, Data Access](https://reader033.fdocuments.in/reader033/viewer/2022042518/5fa6b95fe94e654b474bb264/html5/thumbnails/107.jpg)
Why Model Validation is important
Avoid pushing models with degraded quality.
“Why am I no longer getting recommendations for trips?”
Avoid breaking downstream components (e.g. serving)
![Page 108: TensorFlow Extended (TFX) · TensorFlow Transform Estimator or Keras Model TensorFlow Model Analysis TensorFlow Serving Logging Shared Utilities for Garbage Collection, Data Access](https://reader033.fdocuments.in/reader033/viewer/2022042518/5fa6b95fe94e654b474bb264/html5/thumbnails/108.jpg)
Component: ModelValidator
Model Validator
Data
ExampleGen Trainer
Inputs and Outputs
Validation Outcome
Model (x2)
● Evaluation split of data● Last validated model● New candidate model
![Page 109: TensorFlow Extended (TFX) · TensorFlow Transform Estimator or Keras Model TensorFlow Model Analysis TensorFlow Serving Logging Shared Utilities for Garbage Collection, Data Access](https://reader033.fdocuments.in/reader033/viewer/2022042518/5fa6b95fe94e654b474bb264/html5/thumbnails/109.jpg)
Component: ModelValidator
Model Validator
Data
ExampleGen Trainer
Inputs and Outputs
Validation Outcome
Model (x2)
model_validator = ModelValidator( examples=examples_gen.outputs.output, model=trainer.outputs.output, eval_spec=taxi_mv_spec)
Configuration
● Configuration options○ Validate using current eval data○ “Next-day eval”, validate using unseen data
![Page 110: TensorFlow Extended (TFX) · TensorFlow Transform Estimator or Keras Model TensorFlow Model Analysis TensorFlow Serving Logging Shared Utilities for Garbage Collection, Data Access](https://reader033.fdocuments.in/reader033/viewer/2022042518/5fa6b95fe94e654b474bb264/html5/thumbnails/110.jpg)
Kubeflow Runtime
ExampleGen
StatisticsGen SchemaGen
ExampleValidator
Transform Trainer
Evaluator
ModelValidator Pusher
TFX Config
Metadata Store
Training + Eval Data
TensorFlow Serving
TensorFlow Hub
TensorFlow Lite
TensorFlow JS
Pusher
Airflow Runtime
![Page 111: TensorFlow Extended (TFX) · TensorFlow Transform Estimator or Keras Model TensorFlow Model Analysis TensorFlow Serving Logging Shared Utilities for Garbage Collection, Data Access](https://reader033.fdocuments.in/reader033/viewer/2022042518/5fa6b95fe94e654b474bb264/html5/thumbnails/111.jpg)
Component: Pusher
Pusher
Validation Outcome
ModelValidator
Inputs and Outputs
PusherPusherDeployment
Options
![Page 112: TensorFlow Extended (TFX) · TensorFlow Transform Estimator or Keras Model TensorFlow Model Analysis TensorFlow Serving Logging Shared Utilities for Garbage Collection, Data Access](https://reader033.fdocuments.in/reader033/viewer/2022042518/5fa6b95fe94e654b474bb264/html5/thumbnails/112.jpg)
Component: Pusher
Pusher
Validation Outcome
ModelValidator
Inputs and Outputs
PusherPusherDeployment
Options
pusher = Pusher( model_export=trainer.outputs.output, model_blessing=model_validator.outputs.blessing, serving_model_dir=serving_model_dir)
Configuration
● Block push on validation outcome
● Push destinations supported today○ Filesystem○ TF Serving model server
![Page 113: TensorFlow Extended (TFX) · TensorFlow Transform Estimator or Keras Model TensorFlow Model Analysis TensorFlow Serving Logging Shared Utilities for Garbage Collection, Data Access](https://reader033.fdocuments.in/reader033/viewer/2022042518/5fa6b95fe94e654b474bb264/html5/thumbnails/113.jpg)
Model Deployment
Clemens Mewald
![Page 114: TensorFlow Extended (TFX) · TensorFlow Transform Estimator or Keras Model TensorFlow Model Analysis TensorFlow Serving Logging Shared Utilities for Garbage Collection, Data Access](https://reader033.fdocuments.in/reader033/viewer/2022042518/5fa6b95fe94e654b474bb264/html5/thumbnails/114.jpg)
This is where you are ...
$ curl -d '{"instances": [60, 27.05, ...]}' -X POST
http://localhost:8501/v1/models/chicago_taxi:predict
{ "results": [1.0] }
This is where you want to be ...
assets/
variables/
variables.data-*****-of-*****
variables.index
saved_model.pb
A Trained SavedModel
![Page 115: TensorFlow Extended (TFX) · TensorFlow Transform Estimator or Keras Model TensorFlow Model Analysis TensorFlow Serving Logging Shared Utilities for Garbage Collection, Data Access](https://reader033.fdocuments.in/reader033/viewer/2022042518/5fa6b95fe94e654b474bb264/html5/thumbnails/115.jpg)
Deploy anywhere
JavaScriptEdge devicesServers
Serving Lite .JS
![Page 116: TensorFlow Extended (TFX) · TensorFlow Transform Estimator or Keras Model TensorFlow Model Analysis TensorFlow Serving Logging Shared Utilities for Garbage Collection, Data Access](https://reader033.fdocuments.in/reader033/viewer/2022042518/5fa6b95fe94e654b474bb264/html5/thumbnails/116.jpg)
TensorFlow ServingFlexible
Multi-tenancy
Optimize with GPU and TensorRT
gRPC or REST API
![Page 117: TensorFlow Extended (TFX) · TensorFlow Transform Estimator or Keras Model TensorFlow Model Analysis TensorFlow Serving Logging Shared Utilities for Garbage Collection, Data Access](https://reader033.fdocuments.in/reader033/viewer/2022042518/5fa6b95fe94e654b474bb264/html5/thumbnails/117.jpg)
TensorFlow ServingHigh-Performance
Low-latency
Request Batching
Traffic Isolation
![Page 118: TensorFlow Extended (TFX) · TensorFlow Transform Estimator or Keras Model TensorFlow Model Analysis TensorFlow Serving Logging Shared Utilities for Garbage Collection, Data Access](https://reader033.fdocuments.in/reader033/viewer/2022042518/5fa6b95fe94e654b474bb264/html5/thumbnails/118.jpg)
TensorFlow ServingProduction-Ready
Used for years at Google, millions of QPS
Scale in minutes
Dynamic version refresh
![Page 119: TensorFlow Extended (TFX) · TensorFlow Transform Estimator or Keras Model TensorFlow Model Analysis TensorFlow Serving Logging Shared Utilities for Garbage Collection, Data Access](https://reader033.fdocuments.in/reader033/viewer/2022042518/5fa6b95fe94e654b474bb264/html5/thumbnails/119.jpg)
$ apt-get install tensorflow-model-server
$ tensorflow_model_server
--port=8501
--model_name=chicago_taxi
--model_base_path='/path/to/savedmodel'
Deploy a REST API for your model in minutes ..
$ docker run -p 8501:8501 \
-v '/path/to/savedmodel':/models/chicago_taxi
-e MODEL_NAME=chicago_taxi -t tensorflow/serving
... or locally on
your host ...
... using Docker ...
![Page 120: TensorFlow Extended (TFX) · TensorFlow Transform Estimator or Keras Model TensorFlow Model Analysis TensorFlow Serving Logging Shared Utilities for Garbage Collection, Data Access](https://reader033.fdocuments.in/reader033/viewer/2022042518/5fa6b95fe94e654b474bb264/html5/thumbnails/120.jpg)
Easily enable* hardware acceleration
$ docker run -p 8501:8501 \
-v '/path/to/savedmodel':/models/chicago_taxi
-e MODEL_NAME=chicago_taxi -t tensorflow/serving
$ docker run --runtime=nvidia -p 8501:8501 \
-v /path/to/savedmodel:/models/chicago_taxi
-e MODEL_NAME=chicago_taxi -t tensorflow/serving:latest-gpu
* Only possible if running on a host equipped with a GPU and nvidia-docker installed
![Page 121: TensorFlow Extended (TFX) · TensorFlow Transform Estimator or Keras Model TensorFlow Model Analysis TensorFlow Serving Logging Shared Utilities for Garbage Collection, Data Access](https://reader033.fdocuments.in/reader033/viewer/2022042518/5fa6b95fe94e654b474bb264/html5/thumbnails/121.jpg)
Optimize your model for serving using TensorRT
$ saved_model_cli convert --dir '/path/to/savedmodel'
--output_dir '/path/to/trt-savedmodel' --tag_set serve tensorrt
$ docker run --runtime=nvidia -p 8501:8501 \
-v /path/to/trt-savedmodel:/models/chicago_taxi
-e MODEL_NAME=chicago_taxi -t tensorflow/serving:latest-gpu
![Page 122: TensorFlow Extended (TFX) · TensorFlow Transform Estimator or Keras Model TensorFlow Model Analysis TensorFlow Serving Logging Shared Utilities for Garbage Collection, Data Access](https://reader033.fdocuments.in/reader033/viewer/2022042518/5fa6b95fe94e654b474bb264/html5/thumbnails/122.jpg)
ExampleGen
StatisticsGen SchemaGen
ExampleValidator
Transform
Putting it all together again
Training + Eval Data
![Page 123: TensorFlow Extended (TFX) · TensorFlow Transform Estimator or Keras Model TensorFlow Model Analysis TensorFlow Serving Logging Shared Utilities for Garbage Collection, Data Access](https://reader033.fdocuments.in/reader033/viewer/2022042518/5fa6b95fe94e654b474bb264/html5/thumbnails/123.jpg)
ExampleGen
StatisticsGen SchemaGen
ExampleValidator
Transform Trainer
Putting it all together again
Training + Eval Data
![Page 124: TensorFlow Extended (TFX) · TensorFlow Transform Estimator or Keras Model TensorFlow Model Analysis TensorFlow Serving Logging Shared Utilities for Garbage Collection, Data Access](https://reader033.fdocuments.in/reader033/viewer/2022042518/5fa6b95fe94e654b474bb264/html5/thumbnails/124.jpg)
ExampleGen
StatisticsGen SchemaGen
ExampleValidator
Transform Trainer
Evaluator
ModelValidator
Putting it all together again
Training + Eval Data
![Page 125: TensorFlow Extended (TFX) · TensorFlow Transform Estimator or Keras Model TensorFlow Model Analysis TensorFlow Serving Logging Shared Utilities for Garbage Collection, Data Access](https://reader033.fdocuments.in/reader033/viewer/2022042518/5fa6b95fe94e654b474bb264/html5/thumbnails/125.jpg)
ExampleGen
StatisticsGen SchemaGen
ExampleValidator
Transform Trainer
Evaluator
ModelValidator Pusher
TensorFlow Serving
TensorFlow Hub
TensorFlow Lite
TensorFlow JS
Putting it all together again
Training + Eval Data
![Page 126: TensorFlow Extended (TFX) · TensorFlow Transform Estimator or Keras Model TensorFlow Model Analysis TensorFlow Serving Logging Shared Utilities for Garbage Collection, Data Access](https://reader033.fdocuments.in/reader033/viewer/2022042518/5fa6b95fe94e654b474bb264/html5/thumbnails/126.jpg)
ExampleGen
StatisticsGen SchemaGen
ExampleValidator
Transform Trainer
Evaluator
ModelValidator Pusher
Metadata Store
Training + Eval Data
TensorFlow Serving
TensorFlow Hub
TensorFlow Lite
TensorFlow JS
Putting it all together again
![Page 127: TensorFlow Extended (TFX) · TensorFlow Transform Estimator or Keras Model TensorFlow Model Analysis TensorFlow Serving Logging Shared Utilities for Garbage Collection, Data Access](https://reader033.fdocuments.in/reader033/viewer/2022042518/5fa6b95fe94e654b474bb264/html5/thumbnails/127.jpg)
ExampleGen
StatisticsGen SchemaGen
ExampleValidator
Transform Trainer
Evaluator
ModelValidator Pusher
TFX Config
Metadata Store
Training + Eval Data
TensorFlow Serving
TensorFlow Hub
TensorFlow Lite
TensorFlow JS
Putting it all together again
![Page 128: TensorFlow Extended (TFX) · TensorFlow Transform Estimator or Keras Model TensorFlow Model Analysis TensorFlow Serving Logging Shared Utilities for Garbage Collection, Data Access](https://reader033.fdocuments.in/reader033/viewer/2022042518/5fa6b95fe94e654b474bb264/html5/thumbnails/128.jpg)
ExampleGen
StatisticsGen SchemaGen
ExampleValidator
Transform Trainer
Evaluator
ModelValidator Pusher
TFX Config
Metadata Store
Training + Eval Data
TensorFlow Serving
TensorFlow Hub
TensorFlow Lite
TensorFlow JS
Putting it all together again
Kubeflow RuntimeAirflow Runtime
![Page 129: TensorFlow Extended (TFX) · TensorFlow Transform Estimator or Keras Model TensorFlow Model Analysis TensorFlow Serving Logging Shared Utilities for Garbage Collection, Data Access](https://reader033.fdocuments.in/reader033/viewer/2022042518/5fa6b95fe94e654b474bb264/html5/thumbnails/129.jpg)
Get started with TensorFlow Extended (TFX)An End-to-End ML Platform
github.com/tensorflow/tfx
tensorflow.org/tfx