# https://github.com/feast-dev/feast 项目说明书

生成时间：2026-06-20 17:31:17 UTC

## 目录

- [Overview & Core Architecture](#page-1)
- [Data Infrastructure, Stores & Retrieval](#page-2)
- [Feature Servers, Deployment & Operations](#page-3)
- [Web UI, Extensibility & Integrations](#page-4)

<a id='page-1'></a>

## Overview & Core Architecture

### 相关页面

相关主题：[Data Infrastructure, Stores & Retrieval](#page-2), [Feature Servers, Deployment & Operations](#page-3)

<details>
<summary>相关源码文件</summary>

以下源码文件用于生成本页说明：

- [README.md](https://github.com/feast-dev/feast/blob/main/README.md)
- [infra/feast-operator/README.md](https://github.com/feast-dev/feast/blob/main/infra/feast-operator/README.md)
- [java/serving/README.md](https://github.com/feast-dev/feast/blob/main/java/serving/README.md)
- [ui/README.md](https://github.com/feast-dev/feast/blob/main/ui/README.md)
- [sdk/python/feast/templates/pytorch_nlp/README.md](https://github.com/feast-dev/feast/blob/main/sdk/python/feast/templates/pytorch_nlp/README.md)
- [sdk/python/feast/templates/snowflake/README.md](https://github.com/feast-dev/feast/blob/main/sdk/python/feast/templates/snowflake/README.md)
- [infra/charts/feast/charts/transformation-service/README.md](https://github.com/feast-dev/feast/blob/main/infra/charts/feast/charts/transformation-service/README.md)
- [examples/rag/README.md](https://github.com/feast-dev/feast/blob/main/examples/rag/README.md)
- [examples/credit-risk-end-to-end/README.md](https://github.com/feast-dev/feast/blob/main/examples/credit-risk-end-to-end/README.md)
</details>

# Overview & Core Architecture

## 1. 项目定位与核心价值

Feast（**Fea**ture **St**ore）是一个面向机器学习的开源特征存储系统，旨在为 ML 平台团队提供从历史数据到在线推理的一致性特征管理能力。根据 [`README.md`](https://github.com/feast-dev/feast/blob/main/README.md) 的描述，Feast 的核心价值可以归纳为三点：

- **训练与上线一致**：通过管理 _offline store_（处理历史数据，用于批量评分或模型训练）、低延迟的 _online store_（驱动实时预测）以及经过生产验证的 _feature server_（在线服务预计算特征），使特征在训练和上线两个阶段保持一致。
- **避免数据泄漏**：通过生成 point-in-time correct 的特征集合，使数据科学家专注于特征工程而非调试易出错的连接逻辑，确保未来特征值不会泄漏到训练数据中。
- **解耦 ML 与数据基础设施**：通过抽象特征存储与检索层，使得模型在训练到上线、批处理到实时处理、以及跨数据基础设施迁移时保持可移植性。

资料来源：[README.md:1-25]()

## 2. 核心架构组件

Feast 的最小化部署架构由四大核心组件构成。以下架构图展示了特征从定义、批量处理、写入在线存储到在线服务的完整数据流。

```mermaid
flowchart LR
    A[Feature Repository<br/>feature_store.yaml + *.py] -->|feast apply| B[Registry<br/>注册表]
    B --> C[Offline Store<br/>离线存储]
    B --> D[Online Store<br/>在线存储]
    C -->|materialize /<br/>get_historical_features| D
    C -->|get_historical_features| E[Training / Batch]
    D -->|get_online_features| F[Feature Server<br/>feast serve]
    F --> G[Online Inference]
    D --> H[Transformation Service<br/>按需特征计算]
```

### 2.1 Registry（特征注册表）

Registry 是 Feast 的"元数据中心"，用于记录所有特征定义（entities、feature views、feature services、data sources）。[`sdk/python/feast/templates/snowflake/README.md`](https://github.com/feast-dev/feast/blob/main/sdk/python/feast/templates/snowflake/README.md) 指出，从本地文件注册表过渡到生产时，用户通常需要将 registry 配置为远程文件（如 S3/GCS）或 SQL 注册表，并通过 CI/CD 自动更新。在 [`infra/feast-operator/README.md`](https://github.com/feast-dev/feast/blob/main/infra/feast-operator/README.md) 的第 4 项配置指南中，详细描述了 Local、Remote 以及跨命名空间 `feastRef` 三种注册表拓扑。

### 2.2 Offline Store（离线存储）

Offline Store 负责处理历史特征数据，用于模型训练与批量回填。`README.md` 列出了多种官方与社区支持的数据源：Snowflake、Redshift、BigQuery、Parquet file、Azure Synapse、Postgres、Spark、Couchbase 等。SDK 通过 `feature_store.yaml` 中的 `offline_store.type` 字段选择具体实现。

### 2.3 Online Store（在线存储）

Online Store 提供低延迟的特征读写能力。在 [`sdk/python/feast/templates/pytorch_nlp/README.md`](https://github.com/feast-dev/feast/blob/main/sdk/python/feast/templates/pytorch_nlp/README.md) 的本地开发配置中默认使用 SQLite，而生产环境示例切换到 Redis。值得注意的是，社区长期关注 Redis 适配器的生产就绪度——issue [#3596](https://github.com/feast-dev/feast/issues/3596)（18 条评论）即讨论了其生产稳定性，而 v0.64.0 的修复记录 [9b088fe](https://github.com/feast-dev/feast/commit/9b088fe6144ff35926884cbda96099d0d4a0d66c) 也专门为 `RedisOnlineStore` 添加了 `async_supported` 属性。

### 2.4 Feature Server 与 Transformation Service

Feature Server 是 Feast 的在线服务入口，可通过 `feast serve` 命令启动。在 [`java/serving/README.md`](https://github.com/feast-dev/feast/blob/main/java/serving/README.md) 中描述了基于 Maven 的 Java Serving 构建流程，它依赖本地或远程的 Feast repo 以及一个在线存储实例（如 Redis）。Transformation Service 则独立部署为一个 gRPC 微服务，用于按需（on-demand）特征计算，其 Helm chart 由 [`infra/charts/feast/charts/transformation-service/README.md`](https://github.com/feast-dev/feast/blob/main/infra/charts/feast/charts/transformation-service/README.md) 提供，当前版本 `0.64.0`，镜像为 `quay.io/feastdev/feature-transformation-server`。

## 3. 核心概念与 SDK 入口

Feast 的 Python SDK 提供了一组声明式 API 来定义特征。`feature_store.yaml` 是项目入口，常见的模板配置包括：

| 模板名称 | 默认离线存储 | 默认在线存储 | 典型用途 |
|----------|--------------|--------------|----------|
| `pytorch_nlp` | file | sqlite | 本地 NLP 实验（情感分析） |
| `snowflake` | snowflake | redis | 云上生产特征库 |
| `local` | file | sqlite | 学习与 PoC |

核心概念包括：

- **Entity**：业务主键对象（如 `driver_id`）。
- **Feature View**：将数据源与实体关联的声明，包含 schema、TTL、在线/离线映射等。
- **Feature Service**：将多个 feature views 组合为模型可消费的特征集。
- **Data Source**：声明底层物理表/文件的来源，支持批处理与流处理两类。

在 [`examples/rag/README.md`](https://github.com/feast-dev/feast/blob/main/examples/rag/README.md) 中，`example_repo.py` 展示了如何用上述概念构建一个 RAG 应用：定义实体、feature view（包含 sentence embeddings），配置 Milvus 作为向量库。

## 4. 部署模式与生态

Feast 提供多种部署路径以适配不同成熟度的团队：

- **本地模式**：通过 `feast init` 初始化 SQLite + 文件存储，无需外部依赖，适合学习与原型，参见 [`sdk/python/feast/templates/pytorch_nlp/README.md`](https://github.com/feast-dev/feast/blob/main/sdk/python/feast/templates/pytorch_nlp/README.md)。
- **云原生模式**：基于 Helm charts 与 Feast Operator（`infra/feast-operator`）将整套组件部署到 Kubernetes，并通过 `FeatureStore` CRD 管理生命周期。
- **完整端到端示例**：[`examples/credit-risk-end-to-end`](https://github.com/feast-dev/feast/blob/main/examples/credit-risk-end-to-end/README.md) 以 5 个 notebook 演示了从数据准备、特征库部署、模型训练、上线服务到清理的全流程。

社区方面，UI 仍是实验性模块，[issue #6539](https://github.com/feast-dev/feast/issues/6539) 报告 v0.63.0→v0.64.0 demo UI 出现回归；而 [issue #6488](https://github.com/feast-dev/feast/issues/6488) 则反映了远程 online store 在 `get_online_features` 时仅使用首个 join key 的 bug。路线图层面，issue [#1527](https://github.com/feast-dev/feast/issues/1527) 跟踪了 on-demand transformations、数据质量监控、Snowflake 离线存储、Bigtable 支持、Push/Ingestion API 等长期方向。

## See Also

- [Getting Started with Feast](https://docs.feast.dev/getting-started/architecture-and-components/architecture)
- [Feast Operator Configuration Guides](https://docs.feast.dev/how-to-guides/feast-operator)
- [FeatureStore CR API Reference](https://github.com/feast-dev/feast/blob/main/infra/feast-operator/docs/api/markdown/ref.md)
- [Feast Roadmap Discussion (Issue #1527)](https://github.com/feast-dev/feast/issues/1527)
- [v0.64.0 Release Notes](https://github.com/feast-dev/feast/releases/tag/v0.64.0)

---

<a id='page-2'></a>

## Data Infrastructure, Stores & Retrieval

### 相关页面

相关主题：[Overview & Core Architecture](#page-1), [Feature Servers, Deployment & Operations](#page-3)

<details>
<summary>相关源码文件</summary>

以下源码文件用于生成本页说明：

- [README.md](https://github.com/feast-dev/feast/blob/master/README.md)
- [infra/feast-operator/README.md](https://github.com/feast-dev/feast/blob/master/infra/feast-operator/README.md)
- [sdk/python/feast/templates/snowflake/README.md](https://github.com/feast-dev/feast/blob/master/sdk/python/feast/templates/snowflake/README.md)
- [sdk/python/feast/templates/gcp/README.md](https://github.com/feast-dev/feast/blob/master/sdk/python/feast/templates/gcp/README.md)
- [sdk/python/feast/templates/pytorch_nlp/README.md](https://github.com/feast-dev/feast/blob/master/sdk/python/feast/templates/pytorch_nlp/README.md)
- [examples/rag/README.md](https://github.com/feast-dev/feast/blob/master/examples/rag/README.md)
- [examples/rag-retriever/README.md](https://github.com/feast-dev/feast/blob/master/examples/rag-retriever/README.md)
- [examples/agent_feature_store/README.md](https://github.com/feast-dev/feast/blob/master/examples/agent_feature_store/README.md)
- [examples/credit-risk-end-to-end/README.md](https://github.com/feast-dev/feast/blob/master/examples/credit-risk-end-to-end/README.md)
- [java/serving/README.md](https://github.com/feast-dev/feast/blob/master/java/serving/README.md)
- [go/internal/feast/server/logging/featureserviceschema.go](https://github.com/feast-dev/feast/blob/master/go/internal/feast/server/logging/featureserviceschema.go)
- [infra/charts/feast/charts/transformation-service/README.md](https://github.com/feast-dev/feast/blob/master/infra/charts/feast/charts/transformation-service/README.md)
</details>

# Data Infrastructure, Stores & Retrieval

## 概览：三层存储体系

Feast 作为开源特征存储（Feature Store），其数据基础设施围绕 **Registry（注册表）—Offline Store（离线存储）—Online Store（在线存储）** 三层结构构建，旨在同时支撑模型训练所需的历史数据回填与在线推理所需的低延迟特征读取 ([README.md](https://github.com/feast-dev/feast/blob/master/README.md))。Feast 通过将"特征定义"与"底层存储实现"解耦，使 ML 平台团队可以在不修改特征工程代码的前提下更换底层数据基础设施，从而在训练与服务之间保持口径一致 ([README.md](https://github.com/feast-dev/feast/blob/master/README.md))。

```mermaid
flowchart LR
    A[Feature Definitions<br/>example_repo.py] -->|feast apply| B[Registry]
    B --> C[Offline Store<br/>历史/批量]
    B --> D[Online Store<br/>实时检索]
    D -->|materialize| C
    D -->|get_online_features| E[Feature Server]
    C -->|get_historical_features| F[Training Job]
    E --> G[Online Inference]
```

## 离线存储与历史检索

离线存储用于承载大规模历史特征数据，是 `get_historical_features` 与 point-in-time join 的物理后端。Feast 内置并已验证的离线存储覆盖多种数据仓库与文件格式 ([README.md](https://github.com/feast-dev/feast/blob/master/README.md))：

- **Snowflake**：通过仓库计算能力完成时序对齐与特征回填（参考 [sdk/python/feast/templates/snowflake/README.md](https://github.com/feast-dev/feast/blob/master/sdk/python/feast/templates/snowflake/README.md) 中的 `driver_repo.py` 与 `feature_store.yaml`）。
- **BigQuery**：与 GCP 生态集成，常用于高吞吐批处理 ([sdk/python/feast/templates/gcp/README.md](https://github.com/feast-dev/feast/blob/master/sdk/python/feast/templates/gcp/README.md))。
- **Parquet/Delta 文件存储**：用于本地或对象存储上的离线分析场景。
- **PostgreSQL、Spark、Trino、Hive、Azure Synapse、MS SQL、Couchbase**：通过 contrib 插件扩展 ([README.md](https://github.com/feast-dev/feast/blob/master/README.md))。

历史检索的关键挑战是避免"未来数据泄露"，Feast 通过 point-in-time correct 数据集自动生成训练集，使数据科学家专注特征工程 ([README.md](https://github.com/feast-dev/feast/blob/master/README.md))。社区中也有不少用户希望支持"无 entity_df 的历史检索"（参见 issue #1611），这反映了该 API 当前的刚性约束。

## 在线存储与实时检索

在线存储为低延迟检索优化，常见后端包括 Redis、DynamoDB、SQLite 等。在 `feature_store.yaml` 中可通过 `type` 字段选择：

```yaml
online_store:
  type: redis
  connection_string: redis://my-redis-cluster:6379
```

引用自 [sdk/python/feast/templates/pytorch_nlp/README.md](https://github.com/feast-dev/feast/blob/master/sdk/python/feast/templates/pytorch_nlp/README.md) 中给出的生产配置示例。SQLite 模式则用于本地无外部依赖的开发（同一模板中的 `feature_store.yaml` 演示了零配置启动）。

在线检索通过 `get_online_features` 完成，但社区在 issue #6488 中反馈：**远程在线存储会丢弃除第一个之外的全部 join key**，导致批量实体键查询退化为单行查询。这是当前版本中一个需要重点关注的边界条件。

v0.64.0 的发布说明还提到 `RedisOnlineStore` 修复了 `async_supported` 属性（[9b088fe](https://github.com/feast-dev/feast/commit/9b088fe6144ff35926884cbda96099d0d4a0d66c)），使 Feast Java/Python 异步调用栈能正确识别该适配器。

## 注册表（Registry）与一致性

Registry 是 Feast 唯一的"真理之源"，保存所有 `Entity`、`FeatureView`、`FeatureService`、`DataSource` 的元数据。典型部署模式包括：

| 模式 | 介质 | 适用场景 |
|------|------|----------|
| 本地文件 | `data/registry.db` 或 `registry.pb` | 演示、单机开发 |
| 远程对象存储 | `s3://`、`gs://` | 跨团队共享 |
| SQL Registry | PostgreSQL/Cloud SQL | 多读写方、事务一致性 |
| REST Registry | Feast Registry Server (alpha) | 中心化服务化部署 |

来源：[infra/feast-operator/README.md](https://github.com/feast-dev/feast/blob/master/infra/feast-operator/README.md) 的"4 — Registry Topology"指南。在 Feast Operator 中通过 `feastRef` 跨命名空间引用注册表，并支持 TLS ([infra/feast-operator/README.md](https://github.com/feast-dev/feast/blob/master/infra/feast-operator/README.md))。

Operator 同时暴露"File（路径 + PVC）vs DB"两种持久化模式（[02-Persistence 指南](https://docs.feast.dev/how-to-guides/feast-operator/02-persistence)），Secret 通过挂载到 `/etc/secrets/<name>` 注入凭证。在生产环境中建议从本地 `registry.db` 升级到 SQL 或对象存储注册表，并配合 CI/CD 自动化 `feast apply`（[sdk/python/feast/templates/snowflake/README.md](https://github.com/feast-dev/feast/blob/master/sdk/python/feast/templates/snowflake/README.md)）。

## RAG、向量检索与文档特征

Feast 近年扩展了向量检索能力，定位为 RAG 应用的特征/嵌入存储。在 [examples/rag-retriever/README.md](https://github.com/feast-dev/feast/blob/master/examples/rag-retriever/README.md) 中展示了 `DocEmbedder` 与 `FeastRagRetriever`：

1. **DocEmbedder** 自动化将文档切片、嵌入、生成 `FeatureView` 并 `feast apply`。
2. **多模态嵌入**默认使用 `all-MiniLM-L6-v2`，可通过继承 `BaseEmbedder` 替换。
3. **Milvus** 作为向量后端，通过 `feature_store.yaml` 的 `online_store.type: milvus` 配置。
4. **检索阶段** `FeastRagRetriever` 将用户问题编码后调用 Feast 的向量索引，返回 top-k 文档注入 LLM prompt。

[examples/agent_feature_store/README.md](https://github.com/feast-dev/feast/blob/master/examples/agent_feature_store/README.md) 进一步把 Feast 暴露为 MCP（Model Context Protocol）Feature Server，Agent 在工具调用阶段通过 gRPC/REST 拉取客户画像与知识库向量，实现"记忆 + RAG + 结构化特征"三位一体的检索。

Go 侧服务端日志模块（[go/internal/feast/server/logging/featureserviceschema.go](https://github.com/feast-dev/feast/blob/master/go/internal/feast/server/logging/featureserviceschema.go)）在收到 `getOnlineFeatures` 请求时，会从 `FeatureService.Projections` 中提取所有 join key、特征名与 dtype，并在日志中输出去重后的 join key 集合。这与 issue #6488 中提到的"join key 丢弃"问题处于同一条数据通路——修复点应位于该聚合逻辑。

## Java Serving 与 Transformation Service

在多语言部署中，Feast 提供了 Java 实现的在线特征服务（[java/serving/README.md](https://github.com/feast-dev/feast/blob/master/java/serving/README.md)），通过 Maven 构建可执行 jar，连同一份 Registry 与 Redis 即可对外提供 gRPC 接口。Transformation Service（[infra/charts/feast/charts/transformation-service/README.md](https://github.com/feast-dev/feast/blob/master/infra/charts/feast/charts/transformation-service/README.md)）则负责按需（on-demand）特征计算，其 Helm Chart 默认镜像为 `quay.io/feastdev/feature-transformation-server:0.64.0`，与 v0.64.0 主版本对齐。

## 常见失败模式

1. **在线 join key 丢失**：远程在线存储在多键查询时只取首键（issue #6488），需临时改为多次单键调用或升级到包含该修复的版本。
2. **时区信息丢失**：当前 `UNIX_TIMESTAMP` / `TIMESTAMP` 类型不携带时区，社区在 issue #6536 中要求新增 zoned datetime 类型。
3. **历史检索强依赖 entity_df**：未提供实体 DataFrame 时 `get_historical_features` 无法工作（issue #1611）。
4. **Redis 适配器生产化问题**：issue #3596 长期跟踪其稳定性，建议结合 Connection Pool 监控与超时配置。
5. **Demo UI 在 0.63→0.64 回归**（issue #6539）：升级前需先校验 Web UI 兼容性。

## See Also

- 架构与快速上手：[README.md](https://github.com/feast-dev/feast/blob/master/README.md)
- K8s 部署与持久化：[infra/feast-operator/README.md](https://github.com/feast-dev/feast/blob/master/infra/feast-operator/README.md)
- Snowflake 模板：[sdk/python/feast/templates/snowflake/README.md](https://github.com/feast-dev/feast/blob/master/sdk/python/feast/templates/snowflake/README.md)
- GCP 模板：[sdk/python/feast/templates/gcp/README.md](https://github.com/feast-dev/feast/blob/master/sdk/python/feast/templates/gcp/README.md)
- RAG 与向量检索示例：[examples/rag-retriever/README.md](https://github.com/feast-dev/feast/blob/master/examples/rag-retriever/README.md)
- Agent + MCP Feature Server：[examples/agent_feature_store/README.md](https://github.com/feast-dev/feast/blob/master/examples/agent_feature_store/README.md)
- Java Serving 开发者指南：[java/serving/README.md](https://github.com/feast-dev/feast/blob/master/java/serving/README.md)
- Transformation Service Helm Chart：[infra/charts/feast/charts/transformation-service/README.md](https://github.com/feast-dev/feast/blob/master/infra/charts/feast/charts/transformation-service/README.md)

---

<a id='page-3'></a>

## Feature Servers, Deployment & Operations

### 相关页面

相关主题：[Overview & Core Architecture](#page-1), [Data Infrastructure, Stores & Retrieval](#page-2), [Web UI, Extensibility & Integrations](#page-4)

<details>
<summary>相关源码文件</summary>

以下源码文件用于生成本页说明：

- [README.md](https://github.com/feast-dev/feast/blob/main/README.md)
- [infra/feast-operator/README.md](https://github.com/feast-dev/feast/blob/main/infra/feast-operator/README.md)
- [infra/charts/feast/charts/feature-server/README.md](https://github.com/feast-dev/feast/blob/main/infra/charts/feast/charts/feature-server/README.md)
- [infra/charts/feast/charts/transformation-service/README.md](https://github.com/feast-dev/feast/blob/main/infra/charts/feast/charts/transformation-service/README.md)
- [java/serving/README.md](https://github.com/feast-dev/feast/blob/main/java/serving/README.md)
- [examples/mcp_feature_store/README.md](https://github.com/feast-dev/feast/blob/main/examples/mcp_feature_store/README.md)
- [ui/README.md](https://github.com/feast-dev/feast/blob/main/ui/README.md)
- [sdk/python/feast/templates/pytorch_nlp/README.md](https://github.com/feast-dev/feast/blob/main/sdk/python/feast/templates/pytorch_nlp/README.md)
- [sdk/python/feast/templates/ray/README.md](https://github.com/feast-dev/feast/blob/main/sdk/python/feast/templates/ray/README.md)
- [examples/agent_feature_store/README.md](https://github.com/feast-dev/feast/blob/main/examples/agent_feature_store/README.md)
</details>

# Feature Servers, Deployment & Operations

## 概述

Feast 是一个开源的特征存储系统，其生产化能力离不开一整套配套的 **Feature Server（特征服务）**、**部署拓扑** 与 **运维机制**。Feast 通过统一的离线存储（offline store）、低延迟在线存储（online store）以及经过实战检验的特征服务来管理机器学习特征 [README.md](README.md)。

在最新版本 v0.64.0 中，仓库同时提供了 **Python 特征服务（feast serve）**、**Java 特征服务（Java Serving）**、**Go 特征服务**、**Transformation Service（按需特征计算）** 以及 **MCP 特征服务（Model Context Protocol）** 等多种实现。围绕这些服务，Feast 还提供了 Helm Chart、Kubernetes Operator 以及 Web UI 等部署与运维工具链，覆盖从本地开发到云原生生产环境的完整路径 [README.md](README.md)。

## Feature Server 类型

Feast 的特征服务体系支持多种语言与协议实现，以适配不同的生产场景：

| 服务类型 | 入口/启动方式 | 典型用途 | 资料来源 |
|---|---|---|---|
| Python Feature Server | `feast serve --host 0.0.0.0 --port 6566` | 本地与中小规模在线推理 | [sdk/python/feast/templates/pytorch_nlp/README.md](sdk/python/feast/templates/pytorch_nlp/README.md) |
| Java Feature Server | `mvn -f java/serving/pom.xml package` | 高吞吐、低延迟生产部署 | [java/serving/README.md](java/serving/README.md) |
| Go Feature Server | 由 Go 主程序启动 | 云原生、高性能场景 | [README.md](README.md) |
| Transformation Service | Helm Chart 部署，按需计算特征 | Online Transformation 链 | [infra/charts/feast/charts/transformation-service/README.md](infra/charts/feast/charts/transformation-service/README.md) |
| MCP Feature Server | 启用 `fastapi_mcp` 集成 | AI Agent 工具调用 | [examples/mcp_feature_store/README.md](examples/mcp_feature_store/README.md) |
| Offline Feature Server (alpha) | 通过 FeatureServer CR 部署 | 历史特征回填 | [README.md](README.md) |
| Registry Server (alpha) | 通过 FeatureServer CR 部署 | 跨命名空间/集群的注册中心 | [README.md](README.md) |

```mermaid
flowchart LR
  A[Client / Agent] --> B[Feature Server]
  B --> C[Online Store]
  B --> D[Transformation Service]
  B --> E[Registry]
  D --> C
  E --> B
```

如上所示，特征服务位于客户端与底层存储/计算资源之间，承担请求路由、特征拼接、协议转换（如 gRPC、REST、MCP）以及与 Transformation Service 的协同 [README.md](README.md)、[examples/agent_feature_store/README.md](examples/agent_feature_store/README.md)。

### Python Feature Server

Python 特征服务是入门与中小规模部署的首选。用户通过 `feast init` 初始化仓库后，运行 `feast apply` 写入注册表，再通过 `feast serve` 启动服务，即可暴露在线特征获取端点 [sdk/python/feast/templates/pytorch_nlp/README.md](sdk/python/feast/templates/pytorch_nlp/README.md)。该实现与 Ray Compute Engine 深度集成，可在分布式环境中执行特征计算 [sdk/python/feast/templates/ray/README.md](sdk/python/feast/templates/ray/README.md)。

### Java Feature Server

Java 特征服务面向生产级高吞吐与低延迟场景，仓库提供了独立的 Maven 构建系统。开发者需先执行 `mvn -f java/pom.xml install -Dmaven.test.skip=true` 完成依赖构建，再通过 `mvn -f java/serving/pom.xml package` 打包可执行 JAR。运行时通过 `application-override.yaml` 配置项目与注册表路径，并支持远程注册表（如 `gs://...`）[java/serving/README.md](java/serving/README.md)。

### Transformation Service

Transformation Service 用于按需计算（on-demand）特征。其 Helm Chart 镜像为 `quay.io/feastdev/feature-transformation-server`，默认版本 0.64.0，并支持 gRPC nodePort、Secret 挂载、Pod 标签等 Kubernetes 原生配置 [infra/charts/feast/charts/transformation-service/README.md](infra/charts/feast/charts/transformation-service/README.md)。

### MCP Feature Server

MCP 特征服务通过 `fastapi_mcp` 库将标准 REST 端点暴露为 Model Context Protocol 工具，使 LLM Agent 可直接调用 `get_online_features`、`retrieve_online_documents`、`write_to_online_store` 等通用工具 [examples/mcp_feature_store/README.md](examples/mcp_feature_store/README.md)、[examples/agent_feature_store/README.md](examples/agent_feature_store/README.md)。

## 部署架构

Feast 提供三种主流部署路径：**Helm Chart**、**Kubernetes Operator** 以及**本地/Docker 部署**。

### Helm Chart 部署

`infra/charts/feast/charts/feature-server` Chart 提供了完整的 Java Feature Server 部署模板，可通过 `application-override.yaml` 或 `application-secret.yaml` 注入配置，且 Secret 优先级更高，便于在生产中分离敏感配置 [infra/charts/feast/charts/feature-server/README.md](infra/charts/feast/charts/feature-server/README.md)。`transformation-service` Chart 则镜像化按需特征计算能力，与 feature-server 协同 [infra/charts/feast/charts/transformation-service/README.md](infra/charts/feast/charts/transformation-service/README.md)。

### Kubernetes Operator 部署

Feast Operator 是基于 Kubernetes 的 CRD 控制器，通过 `FeatureStore` CR 管理 Feast 全栈生命周期。官方提供六类配置指南，覆盖项目配置、持久化、服务可观测性、注册表拓扑、安全以及批处理任务 [infra/feast-operator/README.md](infra/feast-operator/README.md)。其 API 参考见 [FeatureStore CR API Reference](https://github.com/feast-dev/feast/blob/main/infra/feast-operator/docs/api/markdown/ref.md)。

### Web UI

Feast Web UI（试验性）支持三种使用方式：通过 `feast ui` CLI 查看当前仓库、作为模块导入到自建 React 应用、或独立构建为完整应用。导入方式下需安装 `@feast-dev/feast-ui` 及可选的 `@elastic/eui`、`@emotion/react` 等样式依赖，并通过 `projects-list.json` 指定项目列表 [ui/README.md](ui/README.md)。

## 运维与配置

生产化部署需重点关注持久化、可观测性、注册表拓扑与安全。

### 持久化与配置管理

v0.64.0 修复了 Operator CRD 缺失的 `feast init` 模板并完善了持久化文档，强化了文件/PVC 与数据库注册表的兼容性 [infra/feast-operator/README.md](infra/feast-operator/README.md)。用户可通过 Helm Chart 的 `secrets` 列表将 Kubernetes Secret 挂载到 `/etc/secrets/<secret name>`，用于注入数据库凭证 [infra/charts/feast/charts/transformation-service/README.md](infra/charts/feast/charts/transformation-service/README.md)。

### 可观测性

Operator 配置指南中的“Serving & Observability”章节涵盖工作进程数、日志级别、Prometheus 指标、离线推送批处理以及 MCP 等可观测性开关 [infra/feast-operator/README.md](infra/feast-operator/README.md)。Java Feature Server 通过 Spring Boot 暴露标准 `/actuator` 端点，便于接入既有监控体系 [infra/charts/feast/charts/feature-server/README.md](infra/charts/feast/charts/feature-server/README.md)。

### 注册表拓扑

Operator 支持本地、远程以及跨命名空间 `feastRef` 引用三种注册表拓扑，使多个 FeatureStore CR 共享同一注册表成为可能 [infra/feast-operator/README.md](infra/feast-operator/README.md)。v0.64.0 还补齐了 `feast init` 模板到 CRD 的映射，避免 Operator 部署时模板缺失 [infra/feast-operator/README.md](infra/feast-operator/README.md)。

### 常见故障模式

社区反馈显示，Redis Online Store 的生产化成熟度（[Issue #3596](https://github.com/feast-dev/feast/issues/3596)）与远程存储 `get_online_features` 丢失 join key（[Issue #6488](https://github.com/feast-dev/feast/issues/6488)）是在线服务阶段的常见痛点。v0.64.0 通过新增 `async_supported` 属性至 `RedisOnlineStore` 修复了异步调用兼容性问题 [v0.64.0 release notes](https://github.com/feast-dev/feast/releases/tag/v0.64.0)。v0.63.0 升级后 Web UI 在 demo 中出现回归 [Issue #6539](https://github.com/feast-dev/feast/issues/6539)，建议在升级前在 CI 环境中固定 UI 行为快照。

## See Also

- [Feast 主仓库 README](../README.md)
- [Feast Operator 配置指南](https://docs.feast.dev/how-to-guides/feast-operator)
- [Python Feature Server 参考](https://docs.feast.dev/reference/feature-servers/python-feature-server)
- [Offline Feature Server (alpha)](https://docs.feast.dev/reference/feature-servers/offline-feature-server)
- [Registry Server (alpha)](https://github.com/feast-dev/feast/blob/master/docs/reference/feature-servers/registry-server.md)
- [MCP Feature Server 示例](https://github.com/feast-dev/feast/tree/main/examples/mcp_feature_store)

---

<a id='page-4'></a>

## Web UI, Extensibility & Integrations

### 相关页面

相关主题：[Overview & Core Architecture](#page-1), [Data Infrastructure, Stores & Retrieval](#page-2), [Feature Servers, Deployment & Operations](#page-3)

<details>
<summary>相关源码文件</summary>

以下源码文件用于生成本页说明：

- [ui/README.md](https://github.com/feast-dev/feast/blob/main/ui/README.md)
- [README.md](https://github.com/feast-dev/feast/blob/main/README.md)
- [infra/feast-operator/README.md](https://github.com/feast-dev/feast/blob/main/infra/feast-operator/README.md)
- [examples/rag/README.md](https://github.com/feast-dev/feast/blob/main/examples/rag/README.md)
- [examples/rag-retriever/README.md](https://github.com/feast-dev/feast/blob/main/examples/rag-retriever/README.md)
- [examples/rag-docling/README.md](https://github.com/feast-dev/feast/blob/main/examples/rag-docling/README.md)
- [sdk/python/feast/templates/pytorch_nlp/README.md](https://github.com/feast-dev/feast/blob/main/sdk/python/feast/templates/pytorch_nlp/README.md)
- [java/serving/README.md](https://github.com/feast-dev/feast/blob/main/java/serving/README.md)
- [infra/charts/feast/charts/transformation-service/README.md](https://github.com/feast-dev/feast/blob/main/infra/charts/feast/charts/transformation-service/README.md)
- [examples/credit-risk-end-to-end/README.md](https://github.com/feast-dev/feast/blob/main/examples/credit-risk-end-to-end/README.md)
</details>

# Web UI、扩展性与集成

## 概述

Feast 是一个面向机器学习的开源特征存储库，本页聚焦其 **Web UI、扩展性接口与外部系统集成** 三个层面。Web UI 提供实验性的可视化前端；扩展性通过项目模板（templates）、示例库（examples）、Java Serving、Helm Chart 以及 Feast Operator 等多个入口向用户开放；集成生态则覆盖数据源、在线存储、向量数据库、RAG/LLM 与云原生部署。资料来源：[README.md]()

## Feast Web UI

### 定位与使用模式

Feast Web UI 被官方明确标记为 `[Experimental]`，可通过三种方式使用：

1. **CLI 模式**：运行 `feast ui` 浏览当前特征仓库；
2. **模块导入**：作为 React 组件 `@feast-dev/feast-ui` 引入自有应用；
3. **独立构建**：以完整 React 应用方式运行。

资料来源：[ui/README.md]()

### 作为模块导入

推荐做法是在通过 `create-react-app` 生成的 React 工程中安装 `@feast-dev/feast-ui`，并按需引入 `@elastic/eui`（Elastic UI Framework）与 `@emotion/react`（样式）。在 `index.js` 中以 `<FeastUI />` 组件渲染后，应用启动时会读取根目录下的 `projects-list.json` 来发现需要展示的特征项目列表。资料来源：[ui/README.md]()

### 已知问题

社区已记录在 `0.63.0` 升级到 `0.64.0` 的过程中，演示场景下的 UI 出现布局异常（[#6539](https://github.com/feast-dev/feast/issues/6539)），升级前应参考该 issue 确认兼容性。

## 扩展性机制

### 项目模板（templates）

`sdk/python/feast/templates/` 目录提供开箱即用的项目骨架。`pytorch_nlp` 模板默认使用 SQLite 作为本地 `online_store`，包含情感分析的特征视图与 `sentiment_analysis_v1`/`v2`/`sentiment_training_features` 三个特征服务，可通过 `feast init my-sentiment-project -t pytorch_nlp` 一键生成。该模板同时演示了**静态资源预加载**（Static Artifacts）以在 feature server 启动时一次性加载模型与查找表。资料来源：[sdk/python/feast/templates/pytorch_nlp/README.md]()

### 示例库（examples）

`examples/` 目录是 Feast 最重要的扩展性演示集合，主要包括：

- **RAG 与 Milvus 向量检索**：`examples/rag/` 演示最小可用的 RAG 应用；`examples/rag-retriever/` 在此基础上提供 `FeastRagRetriever`，并通过 `DocEmbedder` 类自动完成 chunking、embedding、FeatureView 生成与在线存储写入；`examples/rag-docling/` 进一步引入 Docling 进行 PDF 解析。资料来源：[examples/rag/README.md]()、[examples/rag-retriever/README.md]()、[examples/rag-docling/README.md]()
- **端到端流水线**：`examples/credit-risk-end-to-end/` 通过五个 Notebook 串联数据准备、特征存储部署、模型训练、在线服务与清理。资料来源：[examples/credit-risk-end-to-end/README.md]()

### Java Serving 与 Helm Chart

`java/serving/` 子模块基于 Maven 构建，可输出可执行 Jar 包并通过 `application-override.yaml` 指定项目与 registry 路径，对接本地 Redis 进行本地开发与调试。资料来源：[java/serving/README.md]()。Helm Chart `transformation-service`（当前版本 `0.64.0`）负责部署按需特征计算所需的 Transformation Server，参数涵盖镜像、副本数、资源限制与服务端口等。资料来源：[infra/charts/feast/charts/transformation-service/README.md]()

### Feast Operator

`infra/feast-operator/` 提供 K8s Operator 与 `FeatureStore` CRD，使用户可以声明式地部署和管理 Feast 组件。其文档矩阵覆盖项目置备、持久化、Serving 与可观测性、Registry 拓扑（本地/远端/跨命名空间 `feastRef`）、安全（RBAC 或 OIDC）、批处理与定时任务等六大主题。资料来源：[infra/feast-operator/README.md]()

## 集成生态概览

下表汇总 Feast 仓库中明确收录的集成与对应入口，便于按需深入：

| 类别 | 代表集成 | 参考入口 |
|------|---------|----------|
| 数据源 | Snowflake / Redshift / BigQuery / Parquet / Azure Synapse / Hive / Postgres / Spark / Couchbase | [README.md]() |
| 在线存储 | Redis（v0.64.0 修复：补齐 `async_supported` 属性） | [README.md]() |
| 向量检索 | Milvus（用于 RAG 相似度检索） | [examples/rag/README.md]()、[examples/rag-retriever/README.md]() |
| 模型训练 | PyTorch + Hugging Face Transformers | [sdk/python/feast/templates/pytorch_nlp/README.md]() |
| 文档解析 | Docling（PDF → 文本 → 向量） | [examples/rag-docling/README.md]() |
| 部署形态 | Java Serving、Transformation Server Helm Chart、Feast Operator | [java/serving/README.md]()、[infra/charts/feast/charts/transformation-service/README.md]()、[infra/feast-operator/README.md]() |

社区长期关注的扩展方向包括：原生 AWS 支持（[#367](https://github.com/feast-dev/feast/issues/367)）、无实体 DataFrame 的历史检索（[#1611](https://github.com/feast-dev/feast/issues/1611)）、Redis Online Store 生产化改进（[#3596](https://github.com/feast-dev/feast/issues/3596)），以及 RAG 场景下为 Redis Online Store 增加 `retrieve_online_documents_v2` 支持（[#6461](https://github.com/feast-dev/feast/issues/6461)）。

## See Also

- Feast Operator CR API 参考：[infra/feast-operator/docs/api/markdown/ref.md]()
- 示例合集根目录：`examples/`
- 官方文档：<https://docs.feast.dev/>

---

<!-- evidence_pipeline_checked: true -->
<!-- evidence_injected: true -->

---

## Doramagic 踩坑日志

项目：feast-dev/feast

摘要：发现 8 个潜在踩坑项，其中 1 个为 high/blocking；最高优先级：安装坑 - 来源证据：get_online_features on remote stores drops all join keys but the first。

## 1. 安装坑 · 来源证据：get_online_features on remote stores drops all join keys but the first

- 严重度：high
- 证据强度：source_linked
- 发现：GitHub 社区证据显示该项目存在一个安装相关的待验证问题：get_online_features on remote stores drops all join keys but the first
- 对用户的影响：可能增加新用户试用和生产接入成本。
- 证据：community_evidence:github | https://github.com/feast-dev/feast/issues/6488 | 来源讨论提到 python 相关条件，需在安装/试用前复核。

## 2. 能力坑 · 能力判断依赖假设

- 严重度：medium
- 证据强度：source_linked
- 发现：README/documentation is current enough for a first validation pass.
- 对用户的影响：假设不成立时，用户拿不到承诺的能力。
- 证据：capability.assumptions | https://github.com/feast-dev/feast | README/documentation is current enough for a first validation pass.

## 3. 维护坑 · 来源证据：0.63.0 -> 0.64.0: UI breaks in demo

- 严重度：medium
- 证据强度：source_linked
- 发现：GitHub 社区证据显示该项目存在一个维护/版本相关的待验证问题：0.63.0 -> 0.64.0: UI breaks in demo
- 对用户的影响：可能增加新用户试用和生产接入成本。
- 证据：community_evidence:github | https://github.com/feast-dev/feast/issues/6539 | 来源讨论提到 macos 相关条件，需在安装/试用前复核。

## 4. 维护坑 · 维护活跃度未知

- 严重度：medium
- 证据强度：source_linked
- 发现：未记录 last_activity_observed。
- 对用户的影响：新项目、停更项目和活跃项目会被混在一起，推荐信任度下降。
- 证据：evidence.maintainer_signals | https://github.com/feast-dev/feast | last_activity_observed missing

- 严重度：medium
- 证据强度：source_linked
- 发现：no_demo
- 证据：downstream_validation.risk_items | https://github.com/feast-dev/feast | no_demo; severity=medium

## 6. 安全/权限坑 · 存在评分风险

- 严重度：medium
- 证据强度：source_linked
- 发现：no_demo
- 对用户的影响：风险会影响是否适合普通用户安装。
- 证据：risks.scoring_risks | https://github.com/feast-dev/feast | no_demo; severity=medium

## 7. 维护坑 · issue/PR 响应质量未知

- 严重度：low
- 证据强度：source_linked
- 发现：issue_or_pr_quality=unknown。
- 对用户的影响：用户无法判断遇到问题后是否有人维护。
- 证据：evidence.maintainer_signals | https://github.com/feast-dev/feast | issue_or_pr_quality=unknown

## 8. 维护坑 · 发布节奏不明确

- 严重度：low
- 证据强度：source_linked
- 发现：release_recency=unknown。
- 对用户的影响：安装命令和文档可能落后于代码，用户踩坑概率升高。
- 证据：evidence.maintainer_signals | https://github.com/feast-dev/feast | release_recency=unknown

<!-- canonical_name: feast-dev/feast; human_manual_source: deepwiki_human_wiki -->
