Skip to content

Commit

Permalink
Update pipeline.py
Browse files Browse the repository at this point in the history
  • Loading branch information
abhiverse01 authored Jul 29, 2024
1 parent d543c6c commit 19043d2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pipeline/pipeline.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"""TFX pipeline definition for the Iris dataset."""

import os
from tfx.components import CsvExampleGen, StatisticsGen, SchemaGen, ExampleValidator, Transform, Trainer, Evaluator, Pusher
from tfx.orchestration import pipeline
Expand All @@ -6,6 +8,7 @@
from tfx.proto import example_gen_pb2, trainer_pb2, eval_config_pb2, pusher_pb2

def create_pipeline():
"""Creates and returns a TFX pipeline."""
data_root = os.path.join(os.getcwd(), 'data')

input_config = example_gen_pb2.Input(splits=[
Expand All @@ -22,6 +25,7 @@ def create_pipeline():
)

def preprocessing_fn(inputs):
"""TFX preprocessing function."""
import tensorflow_transform as tft
outputs = {}
outputs['sepal_length'] = tft.scale_to_z_score(inputs['sepal_length'])
Expand Down

0 comments on commit 19043d2

Please sign in to comment.