flyte

flyteorgApache-2.0活跃维护

在 Kubernetes 上编排 ML 流水线、智能体和实时推理的类型安全分布式引擎,用纯 Python 的 async/await 写工作流,也支持 Rust、Go 和 TS。

Type-safe, distributed orchestration of agents, ML pipelines, and real-time inference on your k8s — in pure Python with async/await, also other languages (rust, go and ts)

v2.0.54发布于 2026-11-03 18:56 UTC7,831star917fork同步于 2026-11-10 11:32 UTC

怎么上手

由 README 提炼,执行前请确认
uv pip install flyte
硬件要求按 README 说明

README 未说明具体硬件要求;本地可先跑 Devbox 或 GitHub Codespaces,分布式多节点需 Kubernetes 后端。

下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

由 README 自动翻译提炼

用纯 Python 编排 ML 流水线、模型与 Agent 的分布式运行时

在 Kubernetes 上编排 ML 流水线、智能体和实时推理的类型安全分布式引擎,用纯 Python 的 async/await 写工作流,也支持 Rust、Go 和 TS。

核心能力

  • 用 @env.task 装饰器把函数变成可分布式执行的任务
  • 支持 async/await 与 asyncio.gather 并发调度任务
  • 用 TaskEnvironment 声明镜像与运行环境
  • FastAPIAppEnvironment 直接把模型服务化部署
  • 提供 flyte run / flyte serve CLI 与 TUI 本地开发体验

容易踩的坑

Flyte 2 的开源 Kubernetes 后端尚未发布(coming soon),生产级后端目前需用 Union.ai;本仓库为后端与主仓库,Python SDK 在 flyte-sdk 仓库;TUI 需额外安装 flyte[tui]。

内容由模型根据 README 生成,可能不完整或不准确,以官方文档为准。看原文 README

最近发版

5 个版本v2.0.54
  1. v2.0.54最新正式版2026-11-03 · 2026-11-03 18:56 UTC

    What's Changed

  2. v2.0.532026-10-27 · 2026-10-27 04:34 UTC
    查看更新说明

    What's Changed

    New Contributors

    Full Changelog: https://github.com/flyteorg/flyte/compare/v2.0.52...v2.0.53

  3. v2.0.522026-10-21 · 2026-10-21 01:15 UTC
    查看更新说明

    What's Changed

  4. v2.0.512026-10-08 · 2026-10-08 00:20 UTC
    查看更新说明

    What's Changed

    Full Changelog: https://github.com/flyteorg/flyte/compare/v2.0.50...v2.0.51

  5. v2.0.502026-09-24 · 2026-09-24 23:32 UTC
    查看更新说明

    What's Changed

    Full Changelog: https://github.com/flyteorg/flyte/compare/v2.0.49...v2.0.50

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

    [!IMPORTANT]

    Flyte 2 is now generally available!

    Read more in the announcement here.

    Want to try Flyte 2 locally? Run the Devbox locally, or you can try it on Github Codespaces.

    Open in GitHub Codespaces

    Looking for Flyte 1? Go to the master branch, where Flyte 1 is now maintained.


    Flyte 2

    Reliably orchestrate ML pipelines, models, and agents at scale — in pure Python.

    Version Python License Docs SDK Reference CLI Reference

    Flyte is a Graduated project of the LF AI & Data Foundation.

    10 minutes to Flyte 2

    The quickest way to get a feel for Flyte 2 is in this notebook:

    Try In Colab

    Install

    uv pip install flyte
    

    For the full SDK and development tools, see the flyte-sdk repository.

    Example

    import asyncio
    import flyte
    
    env = flyte.TaskEnvironment(
        name="hello_world",
        image=flyte.Image.from_debian_base(python_version=(3, 12)),
    )
    
    @env.task
    def calculate(x: int) -> int:
        return x * 2 + 5
    
    @env.task
    async def main(numbers: list[int]) -> float:
        results = await asyncio.gather(*[
            calculate.aio(num) for num in numbers
        ])
        return sum(results) / len(results)
    
    if __name__ == "__main__":
        flyte.init()
        run = flyte.run(main, numbers=list(range(10)))
        print(f"Result: {run.result}")
    
    python hello.py
    
    flyte run hello.py main --numbers '[1,2,3]'
    

    Serve a Model

    # serving.py
    from fastapi import FastAPI
    import flyte
    from flyte.app.extras import FastAPIAppEnvironment
    
    app = FastAPI()
    env = FastAPIAppEnvironment(
        name="my-model",
        app=app,
        image=flyte.Image.from_debian_base(python_version=(3, 12)).with_pip_packages(
            "fastapi", "uvicorn"
        ),
    )
    
    @app.get("/predict")
    async def predict(x: float) -> dict:
        return {"result": x * 2 + 5}
    
    if __name__ == "__main__":
        flyte.init_from_config()
        flyte.serve(env)
    
    python serving.py
    
    flyte serve serving.py env
    

    Local Development Experience

    Install the TUI for a rich local development experience:

    uv pip install flyte[tui]
    

    Watch the local development experience

    Open Source Backend

    The open source backend for Flyte 2 is coming soon. This repository will contain the Kubernetes-native backend infrastructure for deploying Flyte 2 as a distributed, multi-node service. See the Backend README for the current state of the backend, protocol buffer definitions, and contribution guide.

    If you need an enterprise-ready, production-grade backend for Flyte 2 today, it is available on Union.ai.

    Learn More

    Contributing

    We welcome contributions! See the Backend README for backend development, or join us on slack.flyte.org.

    Sponsors

    CI container image builds for this repository are sponsored by Depot — fast, native multi-arch Docker builds with persistent layer caching.

    Built with Depot

    License

    Apache 2.0 — see LICENSE.