SciPy 2025

Dive into Flytekit's Internals: A Python SDK to Quickly Bring your Code Into Production
07-11, 14:35–15:05 (US/Pacific), Ballroom

Flyte is a Linux Foundation OSS orchestrator built for Data and Machine Learning workflows focused on scalability, reliability, and developer productivity. Flyte’s Python SDK, Flytekit, empowers developers by shipping their code from their local environments onto a cluster with one simple CLI command. In this talk, you will learn about the design and implementation details that powers Flytekit’s core features, such as “fast registration” and “type transformers”, and a plugin system that enables Dask, Ray, or distributed GPU workflows.


Flyte is an open source data and machine learning orchestrator built on top of Kubernetes. Although the backend is built with Golang, most developers use the Python SDK, flytekit, for interacting with Flyte. With the core logic written in Golang, we get the benefits of a compiled language while having the developer ergonomics of Python. In this talk, we will learn about the design constraints and implementation details of flytekit’s core features.

  • Flytekit enables us to run the same code locally and quickly bring that into a remote cluster by adding a --remote flag. The mechanism for sending our code to the cluster is called “fast registration”, which intelligently finds what our code needs and uploads that to a blob store.

  • Flytekit requires the developer to provide types for all functions. Flyte’s “type transformers” use the Python types, so it knows how to serialize data between tasks in a workflow.

  • Scientific Python code has many dependencies and building Docker images can be complex. Flytekit’s image builder abstraction enables us to build images without learning Docker and quickly get up and running.

  • Flytekit’s Python SDK communicates with the Golang backend using Protobuf. This communication mechanism allows Flyte to interoperate with other languages, such as Javascript or Java.

  • Flyte’s plugin system allows us to extend the flytekit with custom code. For example, we can define our own “type transformers”, run Distributed GPU workflows, or use Dask and Ray on Flyte.

By the end of this talk, you will have a deeper understanding of the design decisions and compromises made by flytekit for building a Python SDK used to orchestrate data and machine learning workflows.

Thomas J. Fan is a Member of Technical Staff at Modal and a maintainer of scikit-learn, an open-source machine learning library for Python. At scikit-learn, he led the development of DataFrame interoperability and GPU support through PyTorch. Previously, Thomas was a Columbia University researcher who worked on improving interoperability between machine learning frameworks and AutoML systems.