Kubeflow for Machine Learning
by Trevor Grant, Holden Karau, Boris Lublinsky, Richard Liu, Ilan Filonenko
Appendix B. Cloud-Specific Tools and Configuration
Cloud-specific tools can accelerate your development, but they can also cause vendor lock-in.
Google Cloud
Since Kubeflow originates from Google, it is no surprise that there are some extra features available when running on Google Cloud. We’ll quickly point out how to use TPUs and Dataflow to accelerate your machine learning pipelines, and more Google-specific components are available in the Kubeflow GitHub repo.
TPU-Accelerated Instances
Different parts of the machine learning process can benefit from not only different numbers of machines, but also different types of machines.
The most common example is with model serving: often lots of low-memory machines can perform reasonably well, but for model training, high-memory or TPU accelerated machines can offer greater benefits. While there is a handy built-in shorthand for using GPUs, with TPUs you need to explicitly import kfp.gcp as gcp. Once you’ve imported kfp’s gcp you can add TPU resources to any container operation in a similar way to GPUs by adding .apply(gcp.use_tpu(tpu_cores=cores, tpu_resource=version, tf_version=tf_version)) to your container operation.
Warning
TPU nodes are only available in certain regions. Check this Google Cloud page for a list of supported regions.
Dataflow for TFX
On Google Cloud you can configure Kubeflow’s TFX components to use Google’s Dataflow for distributed processing. To do this, you will need to specify a distributed output location ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access