PROFESSIONAL-MACHINE-LEARNING-ENGINEER · Question #173
You built a custom ML model using scikit-learn. Training time is taking longer than expected. You decide to migrate your model to Vertex AI Training, and you want to improve the model's training time.
The correct answer is B. Train your model using Vertex AI Training with CPUs.. When migrating a scikit-learn model to Vertex AI Training and aiming to improve training time, the first step should be to train the model using Vertex AI Training with CPUs.
Question
Options
- ATrain your model in a distributed mode using multiple Compute Engine VMs.
- BTrain your model using Vertex AI Training with CPUs.
- CMigrate your model to TensorFlow, and train it using Vertex AI Training.
- DTrain your model using Vertex AI Training with GPUs.
How the community answered
(43 responses)- A12% (5)
- B79% (34)
- C2% (1)
- D7% (3)
Why each option
When migrating a scikit-learn model to Vertex AI Training and aiming to improve training time, the first step should be to train the model using Vertex AI Training with CPUs.
Distributed training is complex to implement for many scikit-learn models and might not be beneficial for all algorithms, making it a less suitable initial step compared to leveraging optimized single-node CPU resources.
Training a scikit-learn model on Vertex AI Training with CPUs is the most direct and generally effective first step for improving training time because scikit-learn algorithms are typically CPU-bound. Vertex AI provides optimized CPU instances that can offer better performance than local or unmanaged environments without requiring significant model re-architecture.
Migrating the model to TensorFlow requires a complete rewrite, which is a significant development effort and not a quick solution to improve the training time of an existing scikit-learn model.
Scikit-learn models are generally not designed to utilize GPUs efficiently, and attempting to train them with GPUs would likely not provide a performance benefit and could even be less efficient than CPU training.
Concept tested: Optimizing scikit-learn training on Vertex AI
Source: https://cloud.google.com/vertex-ai/docs/training/configure-compute#choose_a_machine_type
Topics
Community Discussion
No community discussion yet for this question.