PROFESSIONAL-MACHINE-LEARNING-ENGINEER · Question #274
You are developing a custom TensorFlow classification model based on tabular data. Your raw data is stored in BigQuery. contains hundreds of millions of rows, and includes both categorical and…
The correct answer is C. 1. Use TFX components with Dataflow to encode the text features and scale the numerical. For large-scale tabular data from BigQuery requiring MaxMin scaling and one-hot encoding for a custom TensorFlow model trained over multiple epochs, leverage TFX components with Dataflow to minimize effort and cost.
Question
Options
- A
- Write a SQL query to create a separate lookup table to scale the numerical features.
- B
- Use BigQuery to scale the numerical features.
- C
- Use TFX components with Dataflow to encode the text features and scale the numerical
- D
- Write a SQL query to create a separate lookup table to scale the numerical features.
How the community answered
(52 responses)- A8% (4)
- B15% (8)
- C46% (24)
- D31% (16)
Why each option
For large-scale tabular data from BigQuery requiring MaxMin scaling and one-hot encoding for a custom TensorFlow model trained over multiple epochs, leverage TFX components with Dataflow to minimize effort and cost.
Using SQL queries in BigQuery to create lookup tables for scaling or performing encoding can be inefficient and complex to manage for a large number of features and rows, especially when ensuring consistency between training and serving, and for iterative model development.
While BigQuery can perform some data transformations, complex preprocessing like robust one-hot encoding for many categorical features or global MaxMin scaling values consistent across large datasets and multiple training epochs is more efficiently and robustly handled by a dedicated ML preprocessing framework like TFX/TensorFlow Transform, which integrates well with TensorFlow models.
Using TFX components, particularly TensorFlow Transform with Dataflow, is ideal for large-scale, complex preprocessing tasks like MaxMin scaling and one-hot encoding for hundreds of millions of rows. This approach ensures consistent transformations between training and serving, is cost-effective for large datasets via Dataflow's distributed processing, and minimizes effort by providing pre-built, robust components for common ML preprocessing.
Using SQL queries in BigQuery to create lookup tables for scaling or performing encoding can be inefficient and complex to manage for a large number of features and rows, especially when ensuring consistency between training and serving, and for iterative model development.
Concept tested: Large-scale data preprocessing with TFX/Dataflow
Source: https://cloud.google.com/vertex-ai/docs/pipelines/build-tfx-pipeline
Topics
Community Discussion
No community discussion yet for this question.