# Flyte

**Flyte** 是一个开源、[Kubernetes](https://www.edgepedia.org/zh/kubernetes) 原生的机器学习与数据处理流水线工作流编排平台，最初由 Lyft 开发，现已成为 LF AI & Data 基金会的毕业项目。<sup>[1](https://lfaidata.foundation/projects/flyte/)</sup> 用户用 Python（也提供其他语言的 SDK）描述流水线，Flyte 则在 Docker 容器和 Kubernetes 之上管理工作流的数据流、并行化、扩缩容与编排。<sup>[1](https://lfaidata.foundation/projects/flyte/)</sup><sup> • </sup><sup>[2](https://docs-flyte-legacy.union.ai/en/latest/)</sup>

| 关键事实 | 详情 |
|---|---|
| 起源 | 2016 年底诞生于 Lyft，用于为其预计到达时间（ETA）产品交付模型；2020 年 1 月 7 日开源<sup>[3](https://devpress.csdn.net/opensource/62f52c5ac6770329307fb9b0.html)</sup><sup> • </sup><sup>[4](https://venturebeat.com/business/lyft-releases-flyte-a-platform-for-maintaining-ai-workflows)</sup> |
| 开源时的规模 | 在 Lyft 已有超过 7,000 个独立工作流、每月逾 100,000 次执行、100 万个任务和 1,000 万个容器<sup>[4](https://venturebeat.com/business/lyft-releases-flyte-a-platform-for-maintaining-ai-workflows)</sup> |
| 基金会状态 | 2021 年 2 月由 Lyft 捐献给 LF AI & Data，成为其第 25 个托管项目；2021 年 12 月毕业<sup>[1](https://lfaidata.foundation/projects/flyte/)</sup> |
| 核心模型 | 基于 Python 类型注解的强类型任务与工作流；在 Kubernetes Pod 上执行<sup>[5](https://docs-legacy.flyte.org/en/latest/user_guide/flyte_fundamentals/tasks_workflows_and_launch_plans.html)</sup> |
| 许可证与治理 | Apache 2.0，由 Linux 基金会 AI & Data 治理<sup>[6](https://github.com/flyteorg/flyte)</sup> |
| Flyte 2 | 2026 年 8 月正式可用：纯 Python 编写、异步 I/O、持久自愈工作流，以及本地 devbox<sup>[7](https://discuss.flyte.org/)</sup> |

## 在 Lyft 的历史

Flyte 于 2016 年底创建，用于为 Lyft 的 ETA 产品交付模型，该产品预测乘客的到达时间。团队认定平台成熟后，Lyft 于 2020 年 1 月 7 日开源并发布 Flyte，将其描述为一个结构化、分布式的平台，用于并发、可扩展且可维护的机器学习工作流。<sup>[3](https://devpress.csdn.net/opensource/62f52c5ac6770329307fb9b0.html)</sup><sup> • </sup><sup>[4](https://venturebeat.com/business/lyft-releases-flyte-a-platform-for-maintaining-ai-workflows)</sup> 彼时它已在内部服务于 AI 模型训练和数据处理三年多，是定价、位置、ETA、地图和自动驾驶产品团队的首选工具。<sup>[4](https://venturebeat.com/business/lyft-releases-flyte-a-platform-for-maintaining-ai-workflows)</sup>

发布后，Flyte 在 Lyft 内部的采用迅速增长。到 2020 年中，该平台已支撑 ETA、定价、地图、司机互动、增长和地图生成团队超过 100 万条流水线。<sup>[3](https://devpress.csdn.net/opensource/62f52c5ac6770329307fb9b0.html)</sup> 2021 年，Lyft 将 Flyte 捐献给 LF AI & Data 基金会，作为孵化阶段项目，即其第 25 个托管项目，该项目于同年 12 月毕业。<sup>[1](https://lfaidata.foundation/projects/flyte/)</sup><sup> • </sup><sup>[3](https://devpress.csdn.net/opensource/62f52c5ac6770329307fb9b0.html)</sup>

## 设计与核心概念

Flyte 程序由任务和工作流构成。任务是一个工作单元，在 Flyte 集群上执行时运行于 Kubernetes Pod 中；工作流将任务或其他工作流组合成更大计算的各个步骤。<sup>[5](https://docs-legacy.flyte.org/en/latest/user_guide/flyte_fundamentals/tasks_workflows_and_launch_plans.html)</sup> 工作流语法看起来像 Python，但实际上是一种用于构建执行图的领域特定语言，因此工作流主体只支持 Python 语义的一个子集：任务之间传递的值是承诺对象，即尚未实体化的值的占位符，常规的 Python 条件语句必须替换为 Flyte 的条件构造。<sup>[5](https://docs-legacy.flyte.org/en/latest/user_guide/flyte_fundamentals/tasks_workflows_and_launch_plans.html)</sup>

**强类型。** Flyte 的类型系统利用 Python 类型注解来检查任务与工作流之间传递的数据是否匹配所声明的函数签名，从而在编译或调用时捕获类型错误。同一类型系统还支持缓存、数据血缘追踪，以及数据从一个任务移动到另一个任务时的自动序列化与反序列化。<sup>[5](https://docs-legacy.flyte.org/en/latest/user_guide/flyte_fundamentals/tasks_workflows_and_launch_plans.html)</sup>

**可复现性与多租户。** 代码连同其依赖一起进行版本管理和容器化，因此执行保持可复现；Flyte 中的每个实体都是不可变的，每次变更都记录为新版本。Flyte 是一个多租户服务，各团队在各自的仓库中工作，部署时不会影响平台的其他部分，并且它会复用先前执行的缓存输出以节省时间和内存。<sup>[4](https://venturebeat.com/business/lyft-releases-flyte-a-platform-for-maintaining-ai-workflows)</sup>

Flyte 1 后端用 Go 实现，Flytekit 是官方 Python SDK，FlyteCTL 是命令行界面，FlyteIDL 是核心规范语言。<sup>[2](https://docs-flyte-legacy.union.ai/en/latest/)</sup>

## 生态系统与集成

由于任务在容器中运行，Flyte 将系统级和 Python 包级依赖分离，并允许工作流内每个任务使用不同的镜像。插件系统将平台扩展到专用计算和服务，包括使用 Kubeflow PyTorch、Kubeflow MPI 和 [Horovod](https://www.edgepedia.org/zh/horovod) 的分布式训练；Kubernetes 上的 Dask 作业；Spark；Ray；以及 SageMaker 训练。<sup>[4](https://venturebeat.com/business/lyft-releases-flyte-a-platform-for-maintaining-ai-workflows)</sup><sup> • </sup><sup>[8](https://flyte.org/integrations)</sup>

Flyte 2 增加了原生应用集成，封装服务运行时，使常见应用类型无需编写集成衔接代码即可部署：用于仪表盘的 [Streamlit](https://www.edgepedia.org/zh/streamlit) 应用、用于 REST API 的 FastAPI 应用，以及用于以 OpenAI 兼容 API 服务大语言模型的 vLLM、SGLang 和 Ollama。<sup>[9](https://www.union.ai/docs/v2/flyte/user-guide/apps/native-app-integrations/)</sup> 其集成类别涵盖分布式计算、智能体 AI、软件开发工具、数据转换与校验、实验追踪、笔记本执行、LLM 服务、可观测性和性能剖析。<sup>[10](https://www-new.union.ai/docs/v2/union/integrations/)</sup>

## Flyte 2

Flyte 2 于 2026 年 3 月发布以支持本地执行，并于 2026 年 8 月宣布正式可用，它是一次从零重建，而非增量发布。<sup>[7](https://discuss.flyte.org/)</sup> 它提供使用 async/await 的纯 Python 编写、非阻塞的并发任务执行、本地缓存、本地服务、终端 UI，以及能从故障中自行恢复的持久智能体工作流，包括内存不足错误和容器抢占等基础设施故障。<sup>[7](https://discuss.flyte.org/)</sup><sup> • </sup><sup>[6](https://github.com/flyteorg/flyte)</sup> 通过 `flyte start devbox` 启动的本地 devbox 在单台机器上以 Docker 容器运行完整后端、前端和对象存储，采用与生产环境相同的架构。<sup>[11](https://flyte.org/platform/flyte-2)</sup> 一份项目技术报告称，与 Flyte 1 相比，常见工作流模式的运行速度达到原来的 4.3 至 6.5 倍。<sup>[7](https://discuss.flyte.org/)</sup>

Flyte 2 的开源后端通过主仓库分发，而企业级生产后端通过 Union.ai——企业版 Flyte 平台——以商业方式提供。<sup>[6](https://github.com/flyteorg/flyte)</sup>

## 采用情况

Spotify 从 Flyte 开源之旅伊始就是基础合作伙伴，其参与推动了 Flyte 必须跨云工作的需求；该平台已在 AWS 和 GCP 上用于生产环境。<sup>[3](https://devpress.csdn.net/opensource/62f52c5ac6770329307fb9b0.html)</sup> Flyte 网站引用了 Spotify、Wayve 和 Cradle 的生产案例研究：在 Spotify，Flyte 编排的流水线将季度预测时间缩短了一半；Wayve 将其用于 PB 级自动驾驶研发；Cradle 将其用于生成式生物学模型开发。<sup>[12](https://flyte.org/?trk=public_profile__posts-text)</sup>

GitHub 仓库 flyteorg/flyte 在 Apache 2.0 许可证下拥有 7.8k 星标、916 个复刻和超过 5,000 次提交。<sup>[6](https://github.com/flyteorg/flyte)</sup> 编排工具的对比调研将 Flyte 列为支持用 Python 定义工作流并满足常见生产要求的开源平台之一，与 Airflow、Dagster、Prefect、Luigi 和 [Metaflow](https://www.edgepedia.org/zh/metaflow) 并列。<sup>[13](https://dspace.ut.ee/bitstreams/3f82f2e6-d515-4c55-9882-6c94aa97d216/download)</sup><sup> • </sup><sup>[14](https://gradientflow.com/wp-content/uploads/2022/06/GradientFlow-2022-Workflow-Orchestration-Report.pdf)</sup>

## References

1. [Flyte – LFAI & Data Foundation](https://lfaidata.foundation/projects/flyte/)
2. [Welcome to Flyte! – Flyte legacy documentation](https://docs-flyte-legacy.union.ai/en/latest/)
3. [Flyte Joins LF AI & Data (Lyft Engineering blog, March 19, 2021)](https://devpress.csdn.net/opensource/62f52c5ac6770329307fb9b0.html)
4. [Lyft releases Flyte, a platform for maintaining AI workflows – VentureBeat (January 7, 2020)](https://venturebeat.com/business/lyft-releases-flyte-a-platform-for-maintaining-ai-workflows)
5. [Tasks, workflows and launch plans – Flyte documentation](https://docs-legacy.flyte.org/en/latest/user_guide/flyte_fundamentals/tasks_workflows_and_launch_plans.html)
6. [flyteorg/flyte – GitHub](https://github.com/flyteorg/flyte)
7. [Flyte #announcements – Flyte discussion forum](https://discuss.flyte.org/)
8. [Integrations – Flyte](https://flyte.org/integrations)
9. [Native app integrations – Flyte OSS Docs](https://www.union.ai/docs/v2/flyte/user-guide/apps/native-app-integrations/)
10. [Integrations – Union.ai Docs](https://www-new.union.ai/docs/v2/union/integrations/)
11. [Flyte 2 OSS: Backend Devbox and Reimagined UI](https://flyte.org/platform/flyte-2)
12. [Flyte 2: The Durable AI Runtime](https://flyte.org/?trk=public_profile__posts-text)
13. [Selecting the right Data Orchestration Platform – University of Tartu thesis](https://dspace.ut.ee/bitstreams/3f82f2e6-d515-4c55-9882-6c94aa97d216/download)
14. [2022 State of Workflow Orchestration – Gradient Flow](https://gradientflow.com/wp-content/uploads/2022/06/GradientFlow-2022-Workflow-Orchestration-Report.pdf)

---
*Initially written Oct 26, 2026*

Topic: 技术与人造世界 › 计算技术与数字系统 › 人工智能与数据 › Databases and data systems › Data mining, warehousing, and big data › Big data platforms and frameworks

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/flyte

English original: https://www.edgepedia.org/flyte
