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. What should you try out first?
A.
Migrate your model to TensorFlow, and train it using Vertex AI Training.
B.
Train your model in a distributed mode using multiple Compute Engine VMs.
C.
Train your model with DLVM images on Vertex AI, and ensure that your code utilizes NumPy and SciPy internal methods whenever possible.
D.
Train your model using Vertex AI Training with GPUs.
scikit-learn so Option D no good, Option C, training with DLVM images on Vertex AI and optimizing code with NumPy and SciPy, would be more appropriate in your scenario.
DLVM are typically designed for deep learning workloads and do not provide as much benefit for scikit-learn training. Utilizing GPUs for acceleration is best, as scikit-learn can benefit from GPU-accelerated libraries.
GPU Acceleration: Scikit-learn can leverage GPUs for certain algorithms, especially those involving matrix operations, which are common in many machine learning models. GPUs excel at parallel processing, significantly reducing training time compared to CPUs.
Vertex AI Training: Vertex AI Training makes it easy to use GPUs. You can specify the type and number of GPUs in your training job configuration, and Vertex AI handles the infrastructure setup.
Minimal Code Changes: You might need to make minor adjustments to your code to ensure it utilizes the GPU, but generally, scikit-learn integrates well with GPUs.
Options B and C may also be relevant in certain scenarios, but they are generally more involved and might require additional considerations. Option B can be effective for large-scale training tasks, but it might add complexity and overhead. Option C could be helpful, but the impact on training time might not be as immediate and substantial as using GPUs.
D: Training your model with GPUs can provide a substantial speedup, especially for deep learning models or models that require a lot of computation. This option is likely to have a significant impact on training time.
NOT C: While optimizing code can help improve training time to some extent, it may not provide as significant a speedup as the other options. However, it's still a good practice to optimize your code.
I dont think scikit-learn would support GPU or distribution, so based on "What should you try out first?" I think > C. Train your model with DLVM images on Vertex AI, and ensure that your code utilizes NumPy and SciPy internal methods whenever possible.
why not B? Vertex AI provides the ability to distribute training tasks across multiple Compute Engine VMs, which can parallelize the workload and significantly reduce the training time for large datasets and complex models.
Option D is not the optimal choice for a scikit-learn model since scikit-learn does not have native GPU support. Option C, training with DLVM images on Vertex AI and optimizing code with NumPy and SciPy, would be more appropriate in your scenario.
Ans - D. quickest improvement in training time with minimal modifications to your existing scikit-learn model, trying out Option D and training your model using Vertex AI Training with GPUs is the recommended first step.
A) Migrate your model to TensorFlow, and train it using Vertex AI Training.
Not the first thing to do.
B) Train your model in a distributed mode using multiple Compute Engine VMs.
Could be not easy and fast.
D)Train your model using Vertex AI Training with GPUs
sklearn does not support GPUs
Also, most of scikit-learn assumes data is in NumPy arrays or SciPy sparse matrices of a single numeric dtype.
I choose C as the correct answer.
How about using sklearn's multi-core? Considering multiple jobs, could we choose item B?
https://machinelearningmastery.com/multi-core-machine-learning-in-python/
C is correct absolutely
https://console.cloud.google.com/marketplace/details/click-to-deploy-images/deeplearning?_ga=2.139171125.787784554.1674450530-1146240914.1659613735&project=quantum-hash-240404
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
bc3f222
1 month, 2 weeks agodesertlotus1211
2 months, 1 week agorajshiv
4 months, 4 weeks agoFireAtMe
5 months agoFireAtMe
5 months agoAB_C
5 months, 1 week agopico
1 year, 5 months agopico
1 year, 7 months agoandresvelasco
1 year, 7 months agoblobfishtu
1 year, 9 months agoPST21
1 year, 10 months agoPST21
1 year, 10 months agoScipione_
1 year, 11 months agoM25
1 year, 11 months agoTNT87
2 years agoguilhermebutzke
2 years, 2 months agoenghabeth
2 years, 2 months agoJohn_Pongthorn
2 years, 3 months ago